From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kelly Dean" Newsgroups: gmane.emacs.bugs Subject: bug#19068: Mail file vars aren't derived from customized message-directory Date: Sun, 16 Nov 2014 11:27:23 +0000 Message-ID: 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 1416140676 29977 80.91.229.3 (16 Nov 2014 12:24:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2014 12:24:36 +0000 (UTC) To: 19068@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 16 13:24:29 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XpysT-0005Qr-Ec for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Nov 2014 13:24:25 +0100 Original-Received: from localhost ([::1]:43581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpysT-0001gf-0H for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Nov 2014 07:24:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpysG-0001fc-FG for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:24:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xpys6-0003ib-AW for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:24:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xpys6-0003iX-7a for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xpys5-0000JU-TG for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Kelly Dean" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Nov 2014 12:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19068 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14161406271162 (code B ref -1); Sun, 16 Nov 2014 12:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Nov 2014 12:23:47 +0000 Original-Received: from localhost ([127.0.0.1]:34386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xpyrq-0000Ig-Ig for submit@debbugs.gnu.org; Sun, 16 Nov 2014 07:23:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43334) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xpyro-0000IY-Eg for submit@debbugs.gnu.org; Sun, 16 Nov 2014 07:23:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xpyre-0003ek-A2 for submit@debbugs.gnu.org; Sun, 16 Nov 2014 07:23:44 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xpyre-0003ee-6n for submit@debbugs.gnu.org; Sun, 16 Nov 2014 07:23:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpyrT-0001Z5-Sl for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:23:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpyrJ-0003c9-Op for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:23:23 -0500 Original-Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:60487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpyrJ-0003bu-IB for bug-gnu-emacs@gnu.org; Sun, 16 Nov 2014 07:23:13 -0500 Original-Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id C081441C05C for ; Sun, 16 Nov 2014 13:23:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 0Jz9fgb-aJBI for ; Sun, 16 Nov 2014 13:23:07 +0100 (CET) X-Originating-IP: 73.169.42.166 Original-Received: from localhost (c-73-169-42-166.hsd1.co.comcast.net [73.169.42.166]) (Authenticated sender: kelly@prtime.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2FE5D41C053 for ; Sun, 16 Nov 2014 13:23:05 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96105 Delete your ~/Mail directory (uppercase =E2=8C=9CM=E2=8C=9D). Make a ~/mail directory (lowercase =E2=8C=9Cm=E2=8C=9D). Put in your init file just: (require 'message) (setq message-directory "~/mail/") Start Emacs 24.4. Notice that message-auto-save-directory is now =E2=8C=9C~/=E2=8C=9D. The default value of message-auto-save-directory is (if (file-writable-p message-directory) (file-name-as-directory (expand-file-name "drafts" message-director= y)) "~/") but that fails to work as intended, because message-directory still has i= ts default value of =E2=8C=9C~/Mail/=E2=8C=9D, because message.el hasn't = been loaded yet. The docstring for message-directory says =E2=8C=9CDirectory from which al= l other mail file variables are derived=E2=8C=9D, which is misleading bec= ause 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 befo= re the require of message, but also before the require of anything else t= hat might require message, but that defeats the point of require (which i= s supposed to avoid the brittleness of load). Fixing this requires either the other vars to be changed into functions t= hat dynamically derive pathnames from message-directory, or something lik= e a set-message-directory function to be made as a replacement for the me= ssage-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-di= rectory variable should be removed, to avoid misleading users.