Description
(i want to prefix this by saying @miguelraz describes all my bugs as "your setup stuff is in like the .000001% of germs that pure alcohol doesn’t kill neighborhood")
define_editor
in editless.jl
has the following comment:
julia/stdlib/InteractiveUtils/src/editless.jl
Lines 49 to 51 in 083bd8f
the comment is accurate; define_editor
is defined as function define_editor(fn::Function, pattern; wait::Bool=false)
. this is a really weird default. using @edit
with any unrecognized terminal editor will freeze the repl indefinitely; there are also weirder bugs like #53321.
why was this default chosen? i think wait=true
is a much better default; almost all editors either wait, if they run in the terminal, or exit almost immediately if they open a window (e.g. code
, xdg-open
).
steps to replicate
echo 'exec "$EDITOR" "$@"' > my-editor
chmod +x my-editor
JULIA_EDITOR=./my-editor julia
@edit ""[1]
- the REPL freezes indefinitely. you have to kill it, e.g. with
ctrl-z
. even worse, if you manage to exit the editor (since it has taken over stdin, and most likely switched the terminal into canonical mode), signals will not be handled correctly, and you will need to kill it from another terminal, since this one is completely unresponsive.
meta info
julia> versioninfo()
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × AMD Ryzen 7 7700X 8-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
Threads: 1 on 16 virtual cores
Environment:
JULIA_EDITOR = hx-hax
i installed julia through apt on popOS, which claims julia is Version: 1.9.1pop1~1686756697~22.04~8c30437
Activity