all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19068: Mail file vars aren't derived from customized message-directory
@ 2014-11-16 11:27 Kelly Dean
  2015-01-23  3:31 ` Kelly Dean
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Kelly Dean @ 2014-11-16 11:27 UTC (permalink / raw)
  To: 19068

Delete your ~/Mail directory (uppercase ⌜M⌝).
Make a ~/mail directory (lowercase ⌜m⌝).

Put in your init file just:
(require 'message)
(setq message-directory "~/mail/")

Start Emacs 24.4.
Notice that message-auto-save-directory is now ⌜~/⌝.
The default value of message-auto-save-directory is
  (if (file-writable-p message-directory)
      (file-name-as-directory (expand-file-name "drafts" message-directory))
    "~/")
but that fails to work as intended, because message-directory still has its default value of ⌜~/Mail/⌝, because message.el hasn't been loaded yet.

The docstring for message-directory says ⌜Directory from which all other mail file variables are derived⌝, which is misleading because it implies that if you customize that variable, all other mail file variables will be changed to match your customization.

You could avoid the problem by ensuring that the setq comes not only before the require of message, but also before the require of anything else that might require message, but that defeats the point of require (which is supposed to avoid the brittleness of load).

Fixing this requires either the other vars to be changed into functions that dynamically derive pathnames from message-directory, or something like a set-message-directory function to be made as a replacement for the message-directory var, to update all the other vars when it's called.

Also,
grep -r "~/Mail/" emacs-24.4/lisp/ | grep 'el:'
gives 19 hits, all of which are inappropriate if ~/Mail isn't supposed to be hardcoded. If ~/Mail is supposed to be hardcoded, then the message-directory variable should be removed, to avoid misleading users.





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-02-14  6:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-16 11:27 bug#19068: Mail file vars aren't derived from customized message-directory Kelly Dean
2015-01-23  3:31 ` Kelly Dean
2015-01-28 10:17 ` bug#19068: [PATCH] " Kelly Dean
2015-01-29  8:27 ` bug#19068: " Lars Ingebrigtsen
2015-01-29 10:59   ` Kelly Dean
2015-01-29 11:36     ` Ivan Shmakov
2015-01-29 11:36     ` Ivan Shmakov
2015-01-29 16:09 ` Eli Zaretskii
2015-01-30  7:11   ` Kelly Dean
2015-01-30  7:35     ` Ivan Shmakov
2015-01-30 13:45       ` Ivan Shmakov
2015-01-30  9:06     ` Eli Zaretskii
2015-02-14  5:37 ` Lars Ingebrigtsen
2015-02-14  6:54   ` Ivan Shmakov

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.