From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Optional argument for `file-local-copy' Date: Tue, 02 Dec 2014 15:53:14 +0100 Message-ID: <87k32ahzmt.fsf@gmx.de> References: <871tom5jou.fsf@gmx.de> <83bnnqb1lo.fsf@gnu.org> <20141129140856.GA3752@acm.acm> <83a93aax58.fsf@gnu.org> <20141129153320.GC3752@acm.acm> <87d2853q5i.fsf@gmx.de> <87k32cbo06.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417532034 18840 80.91.229.3 (2 Dec 2014 14:53:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2014 14:53:54 +0000 (UTC) Cc: Alan Mackenzie , Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 02 15:53:47 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xvopk-0006GK-UG for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2014 15:53:45 +0100 Original-Received: from localhost ([::1]:37229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvopk-0007m1-EI for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2014 09:53:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvopc-0007lt-0A for emacs-devel@gnu.org; Tue, 02 Dec 2014 09:53:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvopW-0005UE-3I for emacs-devel@gnu.org; Tue, 02 Dec 2014 09:53:35 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:58729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvopP-0005NF-C0; Tue, 02 Dec 2014 09:53:23 -0500 Original-Received: from detlef.gmx.de ([79.195.30.235]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MCggg-1XnbMl0MBW-009OtV; Tue, 02 Dec 2014 15:53:17 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 02 Dec 2014 09:18:41 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:nj5x1v4ybmVNuLe+D47Zk9d4wFfjVj/FGii+gfjOkE3ROFeptlN vKfddmeC1rlvE9YIXQfkigZkvEl2MoS2ats7b8nhHUbnkl7PesJWhg09aCEKE+JWMFurwsH 3Vy9kK1pEOn7UTxojx6A09EfgoTs2sjxXzbVpmpIcJrqGCwnW1hwnQLDellYvu698/zniOa ZzjJ+ZuKMUB8Nqw5cho/A== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178694 Archived-At: Stefan Monnier writes: >> The caller does not need to know whether a file is cached. File name >> handlers implementation shall keep *always* the information about a >> local copy of a remote file (the local name, the result of >> file-attributes of the remote file). > > That means that the file-local-copy handlers *always* have to obey > REUSE-IF-ALREADY-EXISTS, rather only doing so if they use a cache. Well, it does not need to obey that argument. My idea is that the *meta information* are always stored. >> A problem might be to remove local copies when they are not >> used anymore. > > That's inherent in the use of a cache, I'm not too worried about that, > tho of course, we'll have to make it work well (erasing at the end of > the session is problematic since the session might not end cleanly, so > we'll probably want to instead make the cache survive for longer, and > share it across sessions). Yes. This might be mainly problem when the cache is too small on the file system. Maybe one could restrict the size of the files being cacheable. But OTOH, very large files profit more from being cached. Another idea could be to implement a timeout for cached files; after a given time they are not valid anymore. But that's not needed in the beginning; I would add some functionality when there's a need from the users. > Stefan Best regards, Michael.