From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: recentf-cleanup, file-readable-p & remote files Date: Tue, 16 Sep 2003 09:51:37 +0200 (CEST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <14940442.1063698697392.JavaMail.www@wwinf0603> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1063698758 30667 80.91.224.253 (16 Sep 2003 07:52:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Sep 2003 07:52:38 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Sep 16 09:52:36 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19zAdY-0005js-00 for ; Tue, 16 Sep 2003 09:52:36 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 19zAgY-00050n-00 for ; Tue, 16 Sep 2003 09:55:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19zAck-0005sZ-PF for emacs-devel@quimby.gnus.org; Tue, 16 Sep 2003 03:51:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19zAce-0005rt-Ii for emacs-devel@gnu.org; Tue, 16 Sep 2003 03:51:40 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19zAcd-0005rT-2S for emacs-devel@gnu.org; Tue, 16 Sep 2003 03:51:39 -0400 Original-Received: from [193.252.22.25] (helo=mwinf0604.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.22) id 19zAcc-0005r9-Ot; Tue, 16 Sep 2003 03:51:38 -0400 Original-Received: from wwinf0603 (wwinf0603 [172.22.137.30]) by mwinf0604.wanadoo.fr (SMTP Server) with ESMTP id 6289C2800194; Tue, 16 Sep 2003 09:51:37 +0200 (CEST) Original-To: harder@ifa.au.dk X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:16419 gmane.emacs.pretest.bugs:1059 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16419 Hi, > But I'm still not sure if it's not a good idea for `recentf-cleanup' > to call `file-readable-p' on remote files _at all_. The reason is > that it can be a *very* slow operation. My latest change introduced a new feature that make now possible to have predicate functions in `recentf-exclude'. Thus, if you add `file-remote-p' into `recentf-exclude', remote files will no more be put on the recent list. More generally, I could do what you suggest and simply not call `file-readable-p' on remote files, in `recentf-cleanup'. However, what to do then with remote files? Just ignore them, that is never remove them automatically from the recent list? Always remove them? Wouldn't that be equivalent of using `file-remote-p' in the `recentf-exclude' list? IMO a better solution would be to allow to disable connection timeout when calling the `file-readable-p' remote handler (I don't know if this is feasible). So when not connected, `file-readable-p' will immediately return nil, without waiting for a remote connection. Thoughts? David P.S.: I CC this mail to the emacs-devel ML, maybe someone here could help ;-)