with-editor
with-editor copied to clipboard
shell-command-with-editor-mode: path is treated as local for remote files
The with-editor-async-shell-command
and with-editor-shell-command
commands seem to work great with Tramp for remote buffers. However, enabling shell-command-with-editor-mode
and running (async-)shell-command
does not work this well: the running Emacs instance still tries to opens the file printed by the sleeping editor, but on a local machine instead of remotely.
For example, with remote default-directory
-
M-& sh -c 'eval $EDITOR /tmp/test' RET
withM-&
bound towith-editor-async-shell-command
opens/tmp/test
properly on the remote host. -
M-& sh -c 'eval $EDITOR /tmp/test' RET
withshell-command-with-editor-mode
openstest
in the local/tmp/
.