From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4347: Bug for .emacs.d? Date: Fri, 11 Sep 2009 16:23:14 -0400 Message-ID: References: <4AA1B07E.3080703@alice.it> Reply-To: Stefan Monnier , 4347@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1252702070 4642 80.91.229.12 (11 Sep 2009 20:47:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2009 20:47:50 +0000 (UTC) Cc: 4347@emacsbugs.donarmstrong.com, Angelo Graziosi To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 11 22:47:43 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MmD1y-00071r-O6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Sep 2009 22:47:43 +0200 Original-Received: from localhost ([127.0.0.1]:58584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmD1y-0001ag-7w for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Sep 2009 16:47:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmD1Q-0001A8-Gh for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 16:47:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmD1M-00017S-4F for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 16:47:07 -0400 Original-Received: from [199.232.76.173] (port=40710 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmD1L-000176-CO for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 16:47:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49345) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MmD1K-0002s8-Lz for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 16:47:03 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BKkx43024298; Fri, 11 Sep 2009 13:47:00 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8BKU3Mx021513; Fri, 11 Sep 2009 13:30:03 -0700 Resent-Date: Fri, 11 Sep 2009 13:30:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Sep 2009 20:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4347 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4347-submit@emacsbugs.donarmstrong.com id=B4347.125270061620645 (code B ref 4347); Fri, 11 Sep 2009 20:30:03 +0000 Original-Received: (at 4347) by emacsbugs.donarmstrong.com; 11 Sep 2009 20:23:36 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from tomts20-srv.bellnexxia.net (tomts20-srv.bellnexxia.net [209.226.175.74]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BKNYj6020642 for <4347@emacsbugs.donarmstrong.com>; Fri, 11 Sep 2009 13:23:36 -0700 Original-Received: from toip5.srvr.bell.ca ([209.226.175.88]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20090911202334.BOWV6916.tomts20-srv.bellnexxia.net@toip5.srvr.bell.ca> for <4347@emacsbugs.donarmstrong.com>; Fri, 11 Sep 2009 16:23:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwFANVJqkpGN458/2dsb2JhbACBU9tzhBgF Original-Received: from bas1-montreal42-1178046076.dsl.bell.ca (HELO ceviche.home) ([70.55.142.124]) by toip5.srvr.bell.ca with ESMTP; 11 Sep 2009 16:27:11 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 837FFB40D4; Fri, 11 Sep 2009 16:23:14 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Sat, 5 Sep 2009 04:12:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 11 Sep 2009 16:47:07 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30972 Archived-At: >> The build of current CVS creates the empty directory '~/.emacs.d', each time >> one starts Emacs, even if in the '.emacs' file there is Just so I understand better: is the problem that ~/.emacs.d is created at build-time, or that it's created at run-time? IIUC it's done both times right now. The build-time case is a bug (which I think should be fixed along the lines of the patch below), but w.r.t the run-time case, I'm not convinced it's a bug. Stefan Index: lisp/abbrev.el =================================================================== RCS file: /sources/emacs/emacs/lisp/abbrev.el,v retrieving revision 1.83 diff -u -r1.83 abbrev.el --- lisp/abbrev.el 29 Aug 2009 19:22:44 -0000 1.83 +++ lisp/abbrev.el 11 Sep 2009 20:20:26 -0000 @@ -40,7 +40,8 @@ (defcustom abbrev-file-name (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") - "Default name of file to read abbrevs from." + "Default name of file from which to read abbrevs." + :initialize 'custom-initialize-delay :type 'file) (defcustom only-global-abbrevs nil Index: lisp/custom.el =================================================================== RCS file: /sources/emacs/emacs/lisp/custom.el,v retrieving revision 1.146 diff -u -r1.146 custom.el --- lisp/custom.el 5 Jan 2009 03:18:51 -0000 1.146 +++ lisp/custom.el 11 Sep 2009 20:20:27 -0000 @@ -130,6 +119,17 @@ (t (set-default symbol (eval value))))) +(defvar custom-delayed-init-variables nil + "List of variables whose initialization is pending.") + +(defun custom-initialize-delay (symbol value) + "Delay initialization of SYMBOL to the next Emacs start. +This is used in files that are preloaded, so that the initialization is +done in the run-time context rather than the build-time context. +SYMBOL is temporarily initialized to nil." + (set symbol nil) + (push symbol custom-delayed-init-variables)) + (defun custom-declare-variable (symbol default doc &rest args) "Like `defcustom', but SYMBOL and DEFAULT are evaluated as normal arguments. DEFAULT should be an expression to evaluate to compute the default value, Index: lisp/files.el =================================================================== RCS file: /sources/emacs/emacs/lisp/files.el,v retrieving revision 1.1080 diff -u -r1.1080 files.el --- lisp/files.el 7 Sep 2009 15:23:12 -0000 1.1080 +++ lisp/files.el 11 Sep 2009 20:20:31 -0000 @@ -204,6 +204,7 @@ by programs that create small temporary files. This is for systems that have fast storage with limited space, such as a RAM disk." :group 'files + :initialize 'custom-initialize-delay :type '(choice (const nil) directory)) ;; The system null device. (Should reference NULL_DEVICE from C.) @@ -385,6 +386,7 @@ :group 'auto-save :type '(repeat (list (string :tag "Regexp") (string :tag "Replacement") (boolean :tag "Uniquify"))) + :initialize 'custom-initialize-delay :version "21.1") (defcustom save-abbrevs t