[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
complicate).
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
accordingly.
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)
(with-temp-buffer
(let* ((tramp-process-file-modification-list nil)
(dir (file-name-directory file))
...
Best regards, Michael.
- [PATCH 1/1] tramp-handle-process-file optimizations, Julian Scheid, 2009/08/16
- Re: [PATCH 1/1] tramp-handle-process-file optimizations,
Michael Albinus <=
- [PATCH 1/1] tramp-handle-process-file: merge three remote ops into one, Julian Scheid, 2009/08/16
- Re: [PATCH 1/1] tramp-handle-process-file: merge three remote ops into one, Michael Albinus, 2009/08/17
- Message not available
- Re: [PATCH 1/1] tramp-handle-process-file: merge three remote ops into one, Michael Albinus, 2009/08/18
- [PATCH 1/1] Another go at tramp-handle-process-file, Julian Scheid, 2009/08/18
- [PATCH 1/1] Yet another go at tramp-handle-process-file, with proper scope for tramp-process-inhibit-flush, Julian Scheid, 2009/08/18
- Re: [PATCH 1/1] Yet another go at tramp-handle-process-file, with proper scope for tramp-process-inhibit-flush, Michael Albinus, 2009/08/19
- Re: [PATCH 1/1] Yet another go at tramp-handle-process-file, with proper scope for tramp-process-inhibit-flush, Julian Scheid, 2009/08/19
[PATCH 1/1] Inhibit flushing file data by external process while in vc-registered, Julian Scheid, 2009/08/18