* recentf / custom-file
@ 2007-02-13 15:36 David Reitter
0 siblings, 0 replies; 2+ messages in thread
From: David Reitter @ 2007-02-13 15:36 UTC (permalink / raw)
To: emacs- devel
Can I suggest this or a similar small change to cus-edit.el in order
to store the canonicalized version of custom-file in recentf-exclude?
As it is now it doesn't work in cases where `custom-file' is
something like "~/.emacs-custom.el".
*** cus-edit.el 09 Nov 2006 16:48:43 +0000 1.312
--- cus-edit.el 13 Feb 2007 15:30:49 +0000
***************
*** 4187,4197 ****
(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 (or old-buffer (find-file-noselect
filename))
(unless (eq major-mode 'emacs-lisp-mode)
--- 4187,4199 ----
(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 (or old-buffer (find-file-noselect
filename))
(unless (eq major-mode 'emacs-lisp-mode)
^ permalink raw reply [flat|nested] 2+ messages in thread
* recentf / custom-file
@ 2007-02-19 15:49 David Reitter
0 siblings, 0 replies; 2+ messages in thread
From: David Reitter @ 2007-02-19 15:49 UTC (permalink / raw)
To: emacs- devel
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)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-19 15:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-19 15:49 recentf / custom-file David Reitter
-- strict thread matches above, loose matches on Subject: below --
2007-02-13 15:36 David Reitter
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.