[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ange-ftp-get-files is not updating his cache
From: |
Thierry Volpiatto |
Subject: |
Re: ange-ftp-get-files is not updating his cache |
Date: |
Tue, 10 Jul 2012 11:06:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Michael Albinus <address@hidden> writes:
> Thierry Volpiatto <address@hidden> writes:
>
>>> Hi,
>
> Hi Thierry,
>
> [first of all: ange-ftp is not part of Tramp.
Yes but you are the one who know how it works ;-)
> An Emacs mailing list, or filing an Emacs bug, might be more
> appropriate. But so what ...]
Ok.
>>> it seem that `ange-ftp-get-files' always check the content of his cache
>>> in hashtable and doesn't update it after first listing.
>>> Removing the gethash check to `ange-ftp-files-hashtable' fix it.
>>
>> So actually when some files have been copied or removed, one should
>> reread the ftp directory to update cache.
>>
>> This should been done automatically isn't it?
>
> Yes. This not implemented in ange-ftp.
>
>> I have fixed this in helm by doing this before listing a directory:
>>
>> --8<---------------cut here---------------start------------->8---
>> ;; Always reread ftp directory, otherwise we will never be aware
>> ;; of new or deleted files.
>> (when (eq 'ftp (file-remote-p directory 'method))
>> (setq ange-ftp-ls-cache-file nil)
>> (remhash directory ange-ftp-files-hashtable))
>> --8<---------------cut here---------------end--------------->8---
>
> That's a sledge-hammer approach :-)
Yes it is just a work around, it is the only way I found apart
modifying ange-ftp itself of course, which would be better.
> I will see, whether I could improve ange-ftp for this. Unfortunately,
> there are several places one needs to invalidate the cache.
Cool, looking forward for your changes.
Thanks.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997