I'd like to use shell-command-on-region with tramp, so that the shell
process is running remotely. However, it seems that although
shell-command behaves in this way, shell-command-on-region does
not. E.g. this will insert the name of the local host

(let ((default-directory "/u...@host:"))
  (shell-command-on-region (point) (mark) "hostname" t))

but this will insert the name of the remote host

(let ((default-directory "/u...@host:"))
  (shell-command "hostname" t))

emacs-version 23.1.1, tramp-version 2.1.15, Ubuntu 9.10 

I'm curious as to whether this is intended behaviour or a bug, and would
appreciate any suggestions for a nice way to implement my own version of
shell-command-on-region (using tramp technology?) that does run
remotely.

Interestingly the above behaviour seems to contradict this thread on
help-gnu-emacs from last year:

http://lists.gnu.org/archive/html/help-gnu-emacs/2009-01/msg00487.html

But is consistent with this 2002 thread on tramp-devel, where the
bug/feature question is not resolved

http://www.mail-archive.com/[email protected]/msg00341.html

Dan


_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to