From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: recentf / custom-file Date: Mon, 19 Feb 2007 15:49:22 +0000 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1171900222 30255 80.91.229.12 (19 Feb 2007 15:50:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Feb 2007 15:50:22 +0000 (UTC) To: emacs- devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 19 16:50:15 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HJAmH-00045V-S1 for ged-emacs-devel@m.gmane.org; Mon, 19 Feb 2007 16:50:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJAmH-0001SL-ET for ged-emacs-devel@m.gmane.org; Mon, 19 Feb 2007 10:50:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HJAlf-0001H7-QM for emacs-devel@gnu.org; Mon, 19 Feb 2007 10:49:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HJAlc-0001FS-T7 for emacs-devel@gnu.org; Mon, 19 Feb 2007 10:49:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJAlc-0001FJ-KI for emacs-devel@gnu.org; Mon, 19 Feb 2007 10:49:28 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.174]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HJAlc-0005As-4A for emacs-devel@gnu.org; Mon, 19 Feb 2007 10:49:28 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so657853ugf for ; Mon, 19 Feb 2007 07:49:27 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=AGW5P3/bOwoWF6Ls9MI6qOuem7OCBHzooyC+Lom03oDNZBFT2cVQeeSG3LRh8Kq6fpGJWiwY8K6o12QYNP8Gt4fZ7yvex0inxw42MBXlhNlfINaeCaPrTNMhFpBhhoURi2BV1c/hBdwZuC3w/Nh0RsNdZR25rkjObXUzwf8uFk0= Original-Received: by 10.67.101.10 with SMTP id d10mr7018509ugm.1171900167123; Mon, 19 Feb 2007 07:49:27 -0800 (PST) Original-Received: from ?129.215.174.81? ( [129.215.174.81]) by mx.google.com with ESMTP id 27sm9331790ugp.2007.02.19.07.49.25; Mon, 19 Feb 2007 07:49:26 -0800 (PST) X-Mailer: Apple Mail (2.752.2) X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66527 Archived-At: As suggested on Feb 13, this addresses a problem where the custom- file is sometimes added to the "recentf" list of recently opened files, when custom-file is a non-canonical filename such as "~/.emacs- customizations.el" and the options are saved. Please apply the patch at your discretion. 2007-02-19 David Reitter * cus-edit.el (custom-save-all): canonicalize custom-file before storing it in recentf-exclude. Index: cus-edit.el =================================================================== RCS file: /sources/emacs/emacs/lisp/cus-edit.el,v retrieving revision 1.316 diff -c -r1.316 cus-edit.el *** lisp/cus-edit.el 21 Jan 2007 03:53:12 -0000 1.316 --- lisp/cus-edit.el 19 Feb 2007 15:44:56 -0000 *************** *** 4192,4202 **** (when (and (null custom-file) init-file-had-error) (error "Cannot save customizations; init file was not fully loaded")) (let* ((filename (custom-file)) ! (recentf-exclude (if recentf-mode ! (cons (concat "\\`" ! (regexp-quote (custom-file)) ! "\\'") ! recentf-exclude))) (old-buffer (find-buffer-visiting filename))) (with-current-buffer (let ((find-file-visit-truename t)) (or old-buffer (find-file-noselect filename))) --- 4192,4204 ---- (when (and (null custom-file) init-file-had-error) (error "Cannot save customizations; init file was not fully loaded")) (let* ((filename (custom-file)) ! (recentf-exclude ! (if recentf-mode ! (cons (concat "\\`" ! (regexp-quote ! (recentf-expand-file-name (custom-file))) ! "\\'") ! recentf-exclude))) (old-buffer (find-buffer-visiting filename))) (with-current-buffer (let ((find-file-visit-truename t)) (or old-buffer (find-file-noselect filename)))