[Top][All Lists]

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

Re: file properties cache

From: Michael Albinus
Subject: Re: file properties cache
Date: Wed, 31 Jan 2007 22:26:27 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

> Tramp 2.1.8-pre (from CVS)
> When I open a file remotely, its properties (specifically, read-only)
> are cached.  If the attributes are changed on the remote system, I
> still can't open that file for editing because the properties are
> cached.  I've coped by clearing the tramp-cache, but perhaps there
> should be a command to clear the cache for the file currently visited,
> and that command should be (optionally) executed when the buffer is
> closed (e.g. with kill-this-buffer).

Hmm. There's always the ned for balance between a cache and changes
from somewhere else. If the properties of a file are changed outside
Emacs, there is no chance the cache can be kept consistent. The same
problem might appear with ange-ftp, which uses a filec cache as well.

On the other hand, removing file properties every kill-buffer will
reduce the performance improvement by caching.

Tramp tries to remove file properties in all cases it detects there is
a change. If it misses some cases where it should do so, please

Changing the file properties on a remote host during an Emacs session
should be rather rare, shouldn't it? Anyway, such a function for
wiping the properties of a given file out of the cache could look like

(defun tramp-flush-file (filename)
  "Remove Tramp properties of remote FILENAME."
  (when (tramp-tramp-file-p filename)
    (with-parsed-tramp-file-name (expand-file-name filename) nil
      (tramp-flush-file-property v localname))))

> Thanks
> Ted

Best regards, Michael.

reply via email to

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