From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Patch: new function process-file (call-process with file handlers) Date: Sun, 17 Oct 2004 17:53:33 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <863c0dnxxe.fsf@ketchup.de.uu.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1098028724 7538 80.91.229.6 (17 Oct 2004 15:58:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2004 15:58:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 17 17:58:35 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CJDQZ-0004n8-00 for ; Sun, 17 Oct 2004 17:58:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJDXo-0003CQ-Ju for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2004 12:06:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CJDTH-0000UG-16 for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:01:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CJDTC-0000ST-Rh for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:01:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJDTC-0000S2-GE for emacs-devel@gnu.org; Sun, 17 Oct 2004 12:01:18 -0400 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CJDLq-0001sD-Fe for emacs-devel@gnu.org; Sun, 17 Oct 2004 11:53:42 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CJDLo-0004MJ-00 for ; Sun, 17 Oct 2004 17:53:40 +0200 Original-Received: from pd9e1ec9e.dip.t-dialin.net ([217.225.236.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Oct 2004 17:53:40 +0200 Original-Received: from kai by pd9e1ec9e.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Oct 2004 17:53:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 62 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd9e1ec9e.dip.t-dialin.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:CqqlpmZlTAvkkfHmd2JC2Q/C6LY= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28510 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28510 --=-=-= VC includes a function vc-do-command which invokes a version control command. This function uses call-process and therefore only works for local files. Tramp includes tramp-vc-do-command, a version of vc-do-command which invokes shell-command instead of call-process and therefore works for remote files, too. Tramp then advises vc-do-command to invoke tramp-vc-do-command on Tramp files. Some years ago, we discussed replacing this kludge with an enhanced call-process that also groks file handlers. Richard didn't want to change the behavior of call-process and proposed to provide a new function process-file instead. The attached patch provides the new function process-file, adds Tramp support for this new function, and changes VC to invoke process-file instead of call-process. The patch also removes the ugly advice from Tramp if process-file is available. Beware: the Tramp implementation for process-file is far from complete. It appears to be sufficient for vc-do-command. I intend to improve the implementation somewhat if the general approach is agreeable. What do people think? Kai --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=x Content-Description: new function process-file #!/bin/sh what="$1" case x$what in x[cm]*) make maintainer-clean autoconf257 ./configure --prefix=$HOME/sw/emacs --with-gtk make bootstrap ;; xi*) rm -rf $HOME/sw/SAV.emacs mv $HOME/sw/emacs $HOME/sw/SAV.emacs make install tags ( cd $HOME/sw/emacs/share/emacs; mv site-lisp site-lisp.SAV; ln -s /usr/local/share/emacs/site-lisp ) ;; *) echo "Usage: $0 " echo " can be 'make' or 'install'" exit 2 ;; esac --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--