all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: emacs- devel <emacs-devel@gnu.org>
Subject: recentf / custom-file
Date: Mon, 19 Feb 2007 15:49:22 +0000	[thread overview]
Message-ID: <A7BEA8EE-79AA-4E7D-AD2C-539CB3134C0A@gmail.com> (raw)

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 <david.reitter@gmail.com>

	* 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)))

             reply	other threads:[~2007-02-19 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-19 15:49 David Reitter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-02-13 15:36 recentf / custom-file David Reitter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A7BEA8EE-79AA-4E7D-AD2C-539CB3134C0A@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.