From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: Re: recentf improvement Date: Mon, 22 Sep 2003 08:58:47 +0200 (CEST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <33379023.1064213927020.JavaMail.www@wwinf0503> 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 1064214003 25465 80.91.224.253 (22 Sep 2003 07:00:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2003 07:00:03 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Sep 22 09:00:00 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 1A1Kfw-0001lz-00 for ; Mon, 22 Sep 2003 09:00:00 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A1Kld-0001Fh-00 for ; Mon, 22 Sep 2003 09:05:53 +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 1A1Kew-0002V6-FU for emacs-devel@quimby.gnus.org; Mon, 22 Sep 2003 02:58:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A1Keo-0002Ud-3G for emacs-devel@gnu.org; Mon, 22 Sep 2003 02:58:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A1Kem-0002UE-G1 for emacs-devel@gnu.org; Mon, 22 Sep 2003 02:58:49 -0400 Original-Received: from [193.252.22.26] (helo=mwinf0501.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A1Kel-0002U5-Sm; Mon, 22 Sep 2003 02:58:48 -0400 Original-Received: from wwinf0503 (wwinf0503 [172.22.136.30]) by mwinf0501.wanadoo.fr (SMTP Server) with ESMTP id 072F14002BC; Mon, 22 Sep 2003 08:58:47 +0200 (CEST) Original-To: rms 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:16545 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16545 Hi Richard, > Finally, I don't see the point of calling `abbreviate-file-name' on > every recent file before copying them to file-name-history? > > That is so the names in the history will be more concise. > I think this is desirable, so I think you should put that call > back in. OK, here is a new patch. David Index: lisp/recentf.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/recentf.el,v retrieving revision 1.27 diff -c -r1.27 recentf.el *** lisp/recentf.el 15 Sep 2003 16:24:35 -0000 1.27 --- lisp/recentf.el 22 Sep 2003 06:52:58 -0000 *************** *** 240,245 **** --- 240,251 ---- ;; Unavailable until recentf has been loaded. (recentf-auto-cleanup)))) + (defcustom recentf-initialize-file-name-history t + "*non-nil means to initialize `file-name-history' with the recent list. + If `file-name-history' is not empty, do nothing." + :group 'recentf + :type 'boolean) + (defcustom recentf-load-hook nil "*Normal hook run at end of loading the `recentf' package." :group 'recentf *************** *** 1143,1153 **** (defun recentf-load-list () "Load a previously saved recent list. ! Read data from the file specified by `recentf-save-file'." (interactive) (let ((file (expand-file-name recentf-save-file))) (when (file-readable-p file) ! (load-file file)))) (defun recentf-cleanup () "Remove all excluded or non-readable files from the recent list." --- 1149,1165 ---- (defun recentf-load-list () "Load a previously saved recent list. ! Read data from the file specified by `recentf-save-file'. ! When `recentf-initialize-file-name-history' is non-nil, initialize an ! empty `file-name-history' with the recent list." (interactive) (let ((file (expand-file-name recentf-save-file))) (when (file-readable-p file) ! (load-file file) ! (and recentf-initialize-file-name-history ! (not file-name-history) ! (setq file-name-history (mapcar 'abbreviate-file-name ! recentf-list)))))) (defun recentf-cleanup () "Remove all excluded or non-readable files from the recent list."