From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.devel Subject: Re: bug#19068: Mail file vars aren't derived from customized message-directory Date: Thu, 29 Jan 2015 11:36:03 +0000 Message-ID: <87vbjpkee4.fsf@violet.siamics.net> References: <871tme3sbm.fsf@building.gnus.org> <4HEgHd24tKVHJkFYvKryLuxc8K21mIEO6gzZl9psynt@local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1422531407 16197 80.91.229.3 (29 Jan 2015 11:36:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2015 11:36:47 +0000 (UTC) To: 19068@debbugs.gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 29 12:36:45 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YGnOt-0003TX-FX for ged-emacs-devel@m.gmane.org; Thu, 29 Jan 2015 12:36:43 +0100 Original-Received: from localhost ([::1]:59028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGnOs-0002YV-9y for ged-emacs-devel@m.gmane.org; Thu, 29 Jan 2015 06:36:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGnOe-0002YF-7b for emacs-devel@gnu.org; Thu, 29 Jan 2015 06:36:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGnOd-000640-5a for emacs-devel@gnu.org; Thu, 29 Jan 2015 06:36:28 -0500 Original-Received: from fely.am-1.org ([2a01:4f8:d15:1b86::2]:36688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGnOc-00060X-RD for emacs-devel@gnu.org; Thu, 29 Jan 2015 06:36:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=fpCpf12KnXwi30pgmPeYKtXWWZY9bNE0bkVzchz+y2Y=; b=eQMmAOy/QXgzn80jGktYxs2/VE2v5kxs5J1u0/XAeMUAYrJ9A03Msk9u5nUuACCurVpozKTPqFYBdtCZu45UwBFimLNX0p21iPCPWGQsM8CYodtI3sd3vwzd9V+Tp+1YT2eVwF6UqVcWUeyh1oncS6p1Ct4pUCTNDR8otSpQFaA=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YGnOO-0003Vt-C4; Thu, 29 Jan 2015 11:36:13 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YGnOG-0006jj-E0; Thu, 29 Jan 2015 18:36:04 +0700 Mail-Followup-To: 19068@debbugs.gnu.org, emacs-devel@gnu.org In-Reply-To: <4HEgHd24tKVHJkFYvKryLuxc8K21mIEO6gzZl9psynt@local> (Kelly Dean's message of "Thu, 29 Jan 2015 10:59:05 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:d15:1b86::2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181973 Archived-At: >>>>> Kelly Dean 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 =C2=ABsetq=C2=BBs before all their =C2=ABrequire=C2=BBs, just in c= ase? As long as we speak about ~/.emacs, my free advice to the users would be to =E2=80=98setq=E2=80=99 first, and =E2=80=98require=E2=80=99 ne= ver. That is: if the user needs an explicit =E2=80=98require=E2=80=99 there, it= =E2=80=99s quite likely that something is already broken. Normally, all the Emacs packages=E2=80=99 =E2=80=9Centry points=E2=80=9D 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 =E2=80=98autoload=E2=80=99 = form to his or her own ~/.emacs, if one=E2=80=99s somehow missing from the package=E2=80=99s own .el (or loaddefs.el, or the user=E2=80=99s own priva= te 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 =E2=8C=9CDirectory from which all other mail file > variables are derived=E2=8C=9D? I agree that the docstring for this variable is misleading, =E2=80=93 it is /not/ the usual semantics for a variable to change when some other variable (however related) is changed, =E2=80=93 neither in Emacs Lisp, nor in the majority of the programming languages I know. (One notable exception being Make.) That=E2=80=99s contrary to, say, Gnus =E2=80=9Cgroup parameters,=E2=80=9D = which are reconsidered something like every time the group is accessed. I guess it=E2=80=99s possible to reimplement message-directory and its =E2=80=9Cdependent=E2=80=9D variables in a similar manner, but I doubt it= =E2=80=99d 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 =C2=ABm= v=C2=BB > behaves. To continue with the analogy, if you $ dir=3D~/mail in the shell, and then $ mv ~/mail ~/othername, would you expect for ${dir} to still refer to the same directory, =E2=80=93 now known as ~/othername? --=20 FSF associate member #7257 np. Omega =E2=80=94 Bruce Dickinson =E2=80=A6 3= 013 B6A0 230E 334A