all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai Grossjohann <kai@emptydomain.de>
Subject: Patch: new function process-file (call-process with file handlers)
Date: Sun, 17 Oct 2004 17:53:33 +0200	[thread overview]
Message-ID: <863c0dnxxe.fsf@ketchup.de.uu.net> (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

             reply	other threads:[~2004-10-17 15:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-17 15:53 Kai Grossjohann [this message]
2004-10-17 16:57 ` Patch: new function process-file (call-process with file handlers) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=863c0dnxxe.fsf@ketchup.de.uu.net \
    --to=kai@emptydomain.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.