GNU bug report logs -
#19068
Mail file vars aren't derived from customized message-directory
Previous Next
Reported by: "Kelly Dean" <kelly <at> prtime.org>
Date: Sun, 16 Nov 2014 12:24:01 UTC
Severity: minor
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 19068 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The attached patch fixes this bug.
This patch relies on the varhook feature. For details, see:
https://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00974.html
[message-directory-bug.patch (text/x-diff, inline)]
--- emacs-24.4/lisp/gnus/message.el
+++ emacs-24.4/lisp/gnus/message.el
@@ -120,6 +120,9 @@
:group 'message-various
:type 'directory)
+(defvar message-directory-varhook nil)
+(put 'message-directory 'varhook 'message-directory-varhook)
+
(defcustom message-max-buffers 10
"*How many buffers to keep before starting to kill them off."
:group 'message-buffers
@@ -1326,6 +1329,16 @@
:link '(custom-manual "(message)Various Message Variables")
:type '(choice directory (const :tag "Don't auto-save" nil)))
+;; Update message-auto-save-directory when message-directory changes.
+;; Fixes bug #19068.
+(add-hook 'message-directory-varhook
+ (lambda (_sym _env)
+ (setq message-auto-save-directory
+ (if (file-writable-p message-directory)
+ (file-name-as-directory
+ (expand-file-name "drafts" message-directory))
+ "~/"))))
+
(defcustom message-default-charset
(and (not (mm-multibyte-p)) 'iso-8859-1)
"Default charset used in non-MULE Emacsen.
This bug report was last modified 10 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.