Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unhelpful error message for @edit when JULIA_EDITOR, VISUAL, or EDITOR environment not set #55839

Open
devel-chm opened this issue Sep 22, 2024 · 0 comments
Labels
error messages Better, more actionable error messages REPL Julia's REPL (Read Eval Print Loop)

Comments

@devel-chm
Copy link

devel-chm commented Sep 22, 2024

I just tried @edit pwd() in the REPL but on a new computer where I did not have the
usual environment variables configured. The result was this less-than-helpful error:

julia> @edit pwd()
ERROR: SystemError: edit: No error
Stacktrace:
 [1] systemerror(p::Symbol, errno::Int32; extrainfo::Nothing)
   @ Base .\error.jl:176
 [2] systemerror
   @ .\error.jl:175 [inlined]
 [3] (::InteractiveUtils.var"#18#32")(cmd::Cmd, path::String, line::Int32)
   @ InteractiveUtils C:\Software\Julia\julia-1.10.5\share\julia\stdlib\v1.10\InteractiveUtils\src\editless.jl:185
 [4] edit(path::String, line::Int32, column::Int64)
   @ InteractiveUtils C:\Software\Julia\julia-1.10.5\share\julia\stdlib\v1.10\InteractiveUtils\src\editless.jl:240
 [5] edit
   @ C:\Software\Julia\julia-1.10.5\share\julia\stdlib\v1.10\InteractiveUtils\src\editless.jl:232 [inlined]
 [6] edit(f::Any, t::Any)
   @ InteractiveUtils C:\Software\Julia\julia-1.10.5\share\julia\stdlib\v1.10\InteractiveUtils\src\editless.jl:272
 [7] top-level scope
   @ REPL[36]:1

It would be much more useful if the error indicated that the JULIA_EDITOR/VISUAL/EDITOR
needs to be set to your editor of choice.

For reference this is julia-1.10.5 installed from the portable, 64bit, windows install:

Julia Version 1.10.5
Commit 6f3fdf7b36 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, rocketlake)
Threads: 4 default, 1 interactive, 2 GC (on 16 virtual cores)
@inkydragon inkydragon added REPL Julia's REPL (Read Eval Print Loop) error messages Better, more actionable error messages labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Better, more actionable error messages REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

2 participants