tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shell-command-on-region doesn't run remotely


From: Dan Davison
Subject: shell-command-on-region doesn't run remotely
Date: Thu, 18 Feb 2010 10:47:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

[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 "/address@hidden:"))
  (shell-command-on-region (point) (mark) "hostname" t))

but this will insert the name of the remote host

(let ((default-directory "/address@hidden:"))
  (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]