From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Eure Newsgroups: gmane.emacs.help Subject: Re: shell-command-on-region with TRAMP - local binary Date: Tue, 20 Jan 2009 09:56:52 -0800 Message-ID: <1760F6DC-58A1-4206-BC50-63AF82799FD4@digg.com> References: <847860d8-f647-4633-bf43-8c98a4005761@w1g2000prm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232474269 18309 80.91.229.12 (20 Jan 2009 17:57:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2009 17:57:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Terrence Brannon Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 20 18:59:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LPKsO-0001Hw-LE for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Jan 2009 18:59:00 +0100 Original-Received: from localhost ([127.0.0.1]:40026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPKr7-00025g-KG for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Jan 2009 12:57:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPKqN-0001w5-08 for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 12:56:55 -0500 Original-Received: from [199.232.76.173] (port=54165 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPKqM-0001vr-KJ for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 12:56:54 -0500 Original-Received: from mail.digg.com ([64.191.203.36]:41430) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPKqM-0007LG-57 for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 12:56:54 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.digg.com (Postfix) with ESMTP id 08AC4A85015; Tue, 20 Jan 2009 09:56:53 -0800 (PST) X-Virus-Scanned: amavisd-new at X-Spam-Score: -4.501 Original-Received: from mail.digg.com ([127.0.0.1]) by localhost (mail.digg.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AiKH7+9Ys9g4; Tue, 20 Jan 2009 09:56:52 -0800 (PST) Original-Received: from [10.2.16.90] (diggstage01.digg.com [64.191.203.34]) by mail.digg.com (Postfix) with ESMTP id 62D24A85014; Tue, 20 Jan 2009 09:56:52 -0800 (PST) In-Reply-To: <847860d8-f647-4633-bf43-8c98a4005761@w1g2000prm.googlegroups.com> X-Mailer: Apple Mail (2.930.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61508 Archived-At: 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