From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.devel Subject: Re: recentf-cleanup, file-readable-p & remote files Date: Fri, 19 Sep 2003 03:45:03 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <10995583.1063874884674.JavaMail.www@wwinf0401> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1063936075 30854 80.91.224.253 (19 Sep 2003 01:47:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2003 01:47:55 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Sep 19 03:47:53 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 1A0ANF-0006MW-00 for ; Fri, 19 Sep 2003 03:47:53 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A0ARU-0004A1-00 for ; Fri, 19 Sep 2003 03:52:16 +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 1A0AMc-0006hQ-Vl for emacs-devel@quimby.gnus.org; Thu, 18 Sep 2003 21:47:14 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A0AM9-0006ZJ-P8 for emacs-devel@gnu.org; Thu, 18 Sep 2003 21:46:45 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A0AM6-0006We-Vm for emacs-devel@gnu.org; Thu, 18 Sep 2003 21:46:43 -0400 Original-Received: from [193.162.153.4] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A0AM6-0006N0-Dw for emacs-devel@gnu.org; Thu, 18 Sep 2003 21:46:42 -0400 Original-Received: from [195.215.224.141] (0xc3d7e08d.esnxr4.ras.tele.dk [195.215.224.141]) by pfepc.post.tele.dk (Postfix) with ESMTP id 70E90262922; Fri, 19 Sep 2003 03:46:26 +0200 (CEST) Original-To: david.ponce@wanadoo.fr In-Reply-To: <10995583.1063874884674.JavaMail.www@wwinf0401> (David PONCE's message of "Thu, 18 Sep 2003 10:48:04 +0200 (CEST)") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) 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:16475 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16475 David PONCE writes: >> In the example from my previous post doing `file-readable-p' is >> ~500 times slower than actually fetching the file! > > Could you try file-exists-p please? Does it work better? No, it works the same way. > A possibility could be to consider that remote files are always > readable and change `recentf-file-readable-p' like this: > > (or (file-remote-p filename) > (file-readable-p filename))) > > Remote files then could be manually removed from the recent list (M-x > recentf-edit-list), or will be removed naturally by the LRU mechanism Sounds good to me. > Perhaps, in your case, another acceptable workaround could be to > disable the `recentf-auto-cleanup' feature (customize this option to > `never') Your previous suggestion about adding `file-remote-p' to `recentf-exclude' works fine for me personally. I was thinking more about whether the side effects of the default setting are desirable -- i.e. that turning on recentf might initiate a multi-megabyte download of a directory listing.