[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: new function process-file (call-process with file handlers)
From: |
Kai Grossjohann |
Subject: |
Patch: new function process-file (call-process with file handlers) |
Date: |
Sun, 17 Oct 2004 17:53:33 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
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
#!/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 <what>"
echo "<what> can be 'make' or 'install'"
exit 2
;;
esac