[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] tramp-handle-process-file optimizations

From: Michael Albinus
Subject: Re: [PATCH 1/1] tramp-handle-process-file optimizations
Date: Sun, 16 Aug 2009 18:15:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Julian Scheid <address@hidden> writes:

> +2009-08-16  Julian Scheid  <address@hidden>
> +
> +     * tramp-cache.el (tramp-get-modified-by-process): New defun.
> +     (tramp-process-modification-list): New defvar.
> +
> +     * tramp.el (tramp-handle-process-file): Use them.  Also, merge
> +     three remote ops into one.

I believe your patch is too complicate. It parses the arguments of
process-file, and tries to understand what happens. Too much details
must be known (is git called as "git", "/usr/bin/git", "/usr/local/bin/git")?

Furthermore, tramp-process-modification-list must be kept up-to-date;
either by Tramp (it will always loose), or by the caller (too

A possible approach could be to have a variable
tramp-process-file-modification-list. The value of this list could be
either `t' (unknown files are modified, the default value), `nil' (no
file is modified at all), or a list of file names (just these files are
modified). tramp-handle-process-file could flush the file cache

An application could do then (example taken from vc-git.el)

(defun vc-git-registered (file)
  "Check whether FILE is registered with git."
  (when (vc-git-root file)
      (let* ((tramp-process-file-modification-list nil)
             (dir (file-name-directory file))

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]