bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37116: 26.1; User choice user-emacs-directory is not honored


From: Eli Zaretskii
Subject: bug#37116: 26.1; User choice user-emacs-directory is not honored
Date: Wed, 21 Aug 2019 19:35:52 +0300

> Date: Wed, 21 Aug 2019 10:24:50 +0200 (CEST)
> From: bruno.vasselle@laposte.net
> Cc: 37116@debbugs.gnu.org
> 
> > > Typo: you've certainly corrected by yourself, but it is actually 
> > > auto-save-list that is created under
> .emacs.d,
> > > not auto-save-list-file-prefix
> > 
> > It's not a typo: auto-save-list-file-prefix is a defcustom from whose
> 
> I mean: the directory that is created under ".emacs.d/' is not named 
> "auto-save-list-file-prefix", but
> "auto-save-list"

Yes, auto-save-list-file-prefix is the variable whose value includes
the string "auto-save-list".  The problem is that the value of
auto-save-list-file-prefix is computed before user-emacs-directory is
updated by your init file.

Please try the following patch instead of the one I sent earlier:

diff --git a/lisp/startup.el b/lisp/startup.el
index 5644285..ff90646 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -406,6 +406,7 @@ auto-save-list-file-prefix
 Directories in the prefix will be created if necessary.
 Set this to nil if you want to prevent `auto-save-list-file-name'
 from being initialized."
+  :initialize 'custom-initialize-delay
   :type '(choice (const :tag "Don't record a session's auto save list" nil)
                 string)
   :group 'auto-save)
@@ -1282,8 +1283,7 @@ command-line
   ;; depends on the runtime context, in case some of them depend on
   ;; the window-system features.  Example: blink-cursor-mode.
   (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH
-    (mapc 'custom-reevaluate-setting custom-delayed-init-variables)
-    (setq custom-delayed-init-variables nil))
+    (mapc 'custom-reevaluate-setting custom-delayed-init-variables))
 
   (normal-erase-is-backspace-setup-frame)
 
@@ -1377,6 +1377,14 @@ command-line
                 (eq face-ignored-fonts old-face-ignored-fonts))
       (clear-face-cache)))
 
+  ;; Re-evaluate again the predefined variables whose initial value
+  ;; depends on the runtime context, in case the user init file
+  ;; modified user-emacs-directory.  Examples: abbrev-file-name,
+  ;; auto-save-list-file-prefix.
+  (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH
+    (mapc 'custom-reevaluate-setting custom-delayed-init-variables)
+    (setq custom-delayed-init-variables nil))
+
   (setq after-init-time (current-time))
   ;; Display any accumulated warnings after all functions in
   ;; `after-init-hook' like `desktop-read' have finalized possible





reply via email to

[Prev in Thread] Current Thread [Next in Thread]