with-editor icon indicating copy to clipboard operation
with-editor copied to clipboard

shell-command-with-editor-mode: path is treated as local for remote files

Open iostapyshyn opened this issue 1 year ago • 2 comments

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 with M-& bound to with-editor-async-shell-command opens /tmp/test properly on the remote host.
  • M-& sh -c 'eval $EDITOR /tmp/test' RET with shell-command-with-editor-mode opens test in the local /tmp/.

iostapyshyn avatar Nov 08 '23 01:11 iostapyshyn