help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: shell-command-on-region with TRAMP - local binary


From: Ian Eure
Subject: Re: shell-command-on-region with TRAMP - local binary
Date: Tue, 20 Jan 2009 09:56:52 -0800

On Jan 20, 2009, at 7:21 AM, Terrence Brannon wrote:

i want to run HTML Tidy using a binary on my local machine ... the
problem is the buffer I want to run it on is being edited via TRAMP
ssh on a remote machine. So the shell-command-on-region uses ssh to
run the command.

How can I run shell-command-on-region on a remote buffer using a local
binary?

M-: (let ((default-directory "/")) (call-interactively 'shell-command- on-region)) RET

If you never want to use shell-command-on-region with remote processes, you can define around-advice for that function. Otherwise, I think you'll need another function that sets default-directory to a local path.

 - Ian




reply via email to

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