From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Default emacs init file location confusion Date: Tue, 07 Jan 2020 18:12:44 +0200 Message-ID: <83lfqjckjn.fsf@gnu.org> References: <83y2ukc55g.fsf@gnu.org> <85C8025D-ACFD-4DEB-B030-E46B3109323E@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58932"; mail-complaints-to="usenet@blaine.gmane.org" Cc: smartlitchi@gmail.com, lokedhs@gmail.com, emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 07 17:14:00 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iorUW-000CnM-Aa for ged-emacs-devel@m.gmane.org; Tue, 07 Jan 2020 17:14:00 +0100 Original-Received: from localhost ([::1]:52376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iorUU-0008I4-UO for ged-emacs-devel@m.gmane.org; Tue, 07 Jan 2020 11:13:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37680) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iorT8-0006L6-Bn for emacs-devel@gnu.org; Tue, 07 Jan 2020 11:12:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iorT8-0003aN-5N; Tue, 07 Jan 2020 11:12:34 -0500 Original-Received: from [176.228.60.248] (port=1949 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iorT6-0004pG-A8; Tue, 07 Jan 2020 11:12:32 -0500 In-reply-to: (message from Robert Pluim on Tue, 07 Jan 2020 16:26:52 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:244068 Archived-At: > From: Robert Pluim > Cc: Eli Zaretskii , Elias MÃ¥rtenson > , > emacs-devel > Date: Tue, 07 Jan 2020 16:26:52 +0100 > > Lisp Backtrace: > "make-directory-internal" (0xffffb498) > "files--ensure-directory" (0xffffb7c0) > "make-directory" (0xffffbb50) > "locate-user-emacs-file" (0xffffbed0) > 0xf4ce7b70 PVEC_COMPILED > "funcall" (0xffffc1a0) > "eval" (0xffffc2f8) > "custom-reevaluate-setting" (0xffffc5f8) > "mapc" (0xffffc710) > "command-line" (0xffffd0c8) > "normal-top-level" (0xffffd560) > > 'locate-user-emacs-file' says: > > ;; Make sure `user-emacs-directory' exists, > ;; unless we're in batch mode or dumping Emacs. Thanks, but how did user-emacs-directory get set to ~/.config/emacs if that directory didn't exist to begin with? The code in startup.el does (setq user-emacs-directory (startup--xdg-or-homedot startup--xdg-config-home-emacs nil)) and startup--xdg-or-homedot is supposed not to look in ~/.config unless ~/.config/emacs exists and is a directory. Or what am I missing? In any case, the right place to fix this is in startup.el, where we compute the value of user-emacs-directory.