From: Ivan Shmakov <ivan@siamics.net>
To: 19068@debbugs.gnu.org, emacs-devel@gnu.org
Subject: bug#19068: Mail file vars aren't derived from customized message-directory
Date: Thu, 29 Jan 2015 11:36:03 +0000 [thread overview]
Message-ID: <87vbjpkee4.fsf__43460.9613068917$1422531445$gmane$org@violet.siamics.net> (raw)
In-Reply-To: <4HEgHd24tKVHJkFYvKryLuxc8K21mIEO6gzZl9psynt@local> (Kelly Dean's message of "Thu, 29 Jan 2015 10:59:05 +0000")
>>>>> Kelly Dean <kelly@prtime.org> writes:
>>>>> Lars Ingebrigtsen wrote:
[Cc: 19068@, as the discussion still seems relevant to the bug.]
>> That's the wrong way to set variables that have other variables that
>> depend on them.
>> Instead say
>> (setq message-directory "~/mail/") (require 'message)
> And what if you happened to previously require something that already
> required message? Do you want to require users to always put all
> their «setq»s before all their «require»s, just in case?
As long as we speak about ~/.emacs, my free advice to the users
would be to ‘setq’ first, and ‘require’ never.
That is: if the user needs an explicit ‘require’ there, it’s
quite likely that something is already broken. Normally, all
the Emacs packages’ “entry points” are autoloaded, and enabling
a particular function should be just a matter of setting up a
specific hook, or adding an entry to a specific alist, etc.
In the worst case, the user may need to add an ‘autoload’ form
to his or her own ~/.emacs, if one’s somehow missing from the
package’s own .el (or loaddefs.el, or the user’s own private
analogue thereof.)
> Or what if you were already using message mode with the default
> directory settings, but then you decided to change it and customize
> message-directory using Emacs's customization feature, and read the
> help page that says ⌜Directory from which all other mail file
> variables are derived⌝?
I agree that the docstring for this variable is misleading, – it
is /not/ the usual semantics for a variable to change when some
other variable (however related) is changed, – neither in
Emacs Lisp, nor in the majority of the programming languages
I know. (One notable exception being Make.)
That’s contrary to, say, Gnus “group parameters,” which are
reconsidered something like every time the group is accessed.
I guess it’s possible to reimplement message-directory and its
“dependent” variables in a similar manner, but I doubt it’d
worth the effort.
> Would you not expect that when you change a top-level directory, the
> directories under it remain under it? After all, that's the way «mv»
> behaves.
To continue with the analogy, if you $ dir=~/mail in the shell,
and then $ mv ~/mail ~/othername, would you expect for ${dir} to
still refer to the same directory, – now known as ~/othername?
--
FSF associate member #7257 np. Omega — Bruce Dickinson … 3013 B6A0 230E 334A
next prev parent reply other threads:[~2015-01-29 11:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='87vbjpkee4.fsf__43460.9613068917$1422531445$gmane$org@violet.siamics.net' \
--to=ivan@siamics.net \
--cc=19068@debbugs.gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.