1. Let your ~/.emacs file contain only this line: (recentf-mode 1) 2. Start Emacs without any command line arguments. The File menu contains a submenu Open Recent, and this contains no files (the value of recentf-list is nil). 3. Visit several files. These will now be listed in the Open Recent menu (and in the list value of recentf-list). 4. Click on the Options item in the Open Recent menu (or type M-x customize-group RET recentf RET) and in the customization buffer change the value of recentf-save-file, e.g. to ~/.recentfoo, and then click `Save for Future Sessions'. 5. Kill Emacs. From the shell you can confirm that your ~/.emacs contains the customization of recentf-save-file, and that ~/.recentfoo exists and contains the list of files you visited, as the value of recentf-list. 6. Start Emacs without any command line arguments. The Open Recent still contains no files (the value of recentf-list is nil), although the value of recentf-save-file is what you had set (e.g. "~/.recentfoo").
The following patch (modelled on the recent fix by Glenn Morris to analogous problems in calendar.el and diary-lib.el) fixes this bug. (I haven't checked whether other defcustoms in recentf.el are also susceptible to this bug, so I kept the fix local to recentf-save-file, rather than introducing a separate function, as Glenn did.) *** recentf.el~1.55~ 2007-01-21 23:44:40.000000000 +0100 --- recentf.el 2007-03-21 16:20:11.000000000 +0100 *************** *** 72,78 **** (defcustom recentf-save-file "~/.recentf" "*File to save the recent list into." :group 'recentf ! :type 'file) (defcustom recentf-save-file-modes 384 ;; 0600 "Mode bits of recentf save file, as an integer, or nil. --- 72,85 ---- (defcustom recentf-save-file "~/.recentf" "*File to save the recent list into." :group 'recentf ! :type 'file ! :initialize 'custom-initialize-default ! :set (lambda (symbol value) ! (let ((oldvalue (eval symbol))) ! (custom-set-default symbol value) ! (and (not (equal value oldvalue)) ! recentf-mode ! (recentf-load-list))))) (defcustom recentf-save-file-modes 384 ;; 0600 "Mode bits of recentf save file, as an integer, or nil. In GNU Emacs 22.0.96.3 (i686-pc-linux-gnu, GTK+ Version 2.10.6) of 2007-03-21 on escher Windowing system distributor `The X.Org Foundation', version 11.0.70199902 configured using `configure '--with-x-toolkit=gtk'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Summary Minor modes in effect: tabbar-mwheel-mode: t tabbar-mode: t recentf-mode: t display-time-mode: t show-paren-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: identity Recent input: <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <f1> M-x r e c e <tab> f <tab> C-g C-c r C-g M-x r e c e <tab> q <backspace> f <tab> l o <tab> <return> C-c r C-g C-c r r e <return> C-c , j r <tab> q <next> <next> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-3> <mouse-3> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <backspace> <down-mouse-1> <mouse-1> C-x C-s C-c r . e m a <right> <right> <right> C-g C-c r t e s <return> C-, C-x C-s C-x d ~ <return> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <up> <up> <up> <down> R M-n . o r i g <return> <down> <down> R M-n <M-backspace> <backspace> <return> <end> g <prior> <help-echo> <select-window> <help-echo> g <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> d x y e s <return> C-c j e <tab> <return> <help-echo> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-3> <mouse-3> C-x C-s <down-mouse-1> <mouse-1> <help-echo> <help-echo> <select-window> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> M-x g u <return> J j y <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <up> M-g <return> <return> C-s C-q C-j SPC . <right> SPC u <f1> <down> <down> <down> <down> <down> <down> <up> SPC <down> SPC <down> SPC n SPC n n n SPC n n SPC <f1> <prior> M-x r e p o <tab> r <tab> <return> Recent messages: Loading gnus-async...done Loading smiley...done Loading gnus-cite...done Parsing BBDB... (frobnicating...done) Loading flow-fill...done Auto-saving...done Auto-saving...done Auto-saving...done Making completion list... Loading emacsbug...done _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug