unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch: new function process-file (call-process with file handlers)
@ 2004-10-17 15:53 Kai Grossjohann
  2004-10-17 16:57 ` David Kastrup
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Kai Grossjohann @ 2004-10-17 15:53 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: new function process-file --]
[-- Type: text/x-patch, Size: 456 bytes --]

#!/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

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2004-10-24 20:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-17 15:53 Patch: new function process-file (call-process with file handlers) Kai Grossjohann
2004-10-17 16:57 ` David Kastrup
2004-10-17 16:58 ` Stefan Monnier
2004-10-18  8:28   ` Kim F. Storm
2004-10-18 10:24     ` David Kastrup
2004-10-24 13:27       ` Kai Grossjohann
2004-10-17 19:19 ` Kai Grossjohann
2004-10-17 20:48   ` Stefan Monnier
2004-10-18  6:44     ` Kai Grossjohann
2004-10-18 13:59     ` Richard Stallman
2004-10-19  6:37       ` Michael Albinus
2004-10-23 20:03       ` Kai Grossjohann
2004-10-24  1:17         ` Luc Teirlinck
2004-10-24  9:10           ` Kai Grossjohann
2004-10-24 15:09             ` Luc Teirlinck
2004-10-24 18:29             ` Luc Teirlinck
2004-10-24 20:06               ` Kai Grossjohann
2004-10-24 18:46             ` Luc Teirlinck
2004-10-24 19:30               ` Luc Teirlinck
2004-10-24 19:37               ` Luc Teirlinck
2004-10-24 20:08               ` Kai Grossjohann
2004-10-24 20:22                 ` Luc Teirlinck
2004-10-24 20:59                 ` Luc Teirlinck
2004-10-18 19:52   ` Michael Albinus
2004-10-23 20:00 ` Kai Grossjohann

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).