[apologies if this comes through twice]

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.

But maybe I'm getting something wrong, as the above behaviour seems to
contradict this 2008 thread on tramp-devel

http://lists.gnu.org/archive/html/tramp-devel/2008-05/msg00025.html

and also this Jan 2009 thread on help-gnu-emacs

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

Although it is consistent with this 2002 thread on tramp-devel (where
the bug/feature question is not resolved)

http://lists.gnu.org/archive/html/tramp-devel/2002-10/msg00039.html

Dan


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

Reply via email to