From unknown Sat Aug 16 11:42:16 2025 X-Loop: don@donarmstrong.com Subject: bug#583: Use XDG basedir spec for configuration files? Reply-To: ferkiwi+a@gmail.com, 583@debbugs.gnu.org Resent-From: Fernando Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 21 Jul 2008 07:05:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 583 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12166235861888 (code B ref -1); Mon, 21 Jul 2008 07:05:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-0.4 required=4.0 tests=BAYES_20,FOURLA,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jul 2008 06:59:46 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6L6xaM4001882 for ; Sun, 20 Jul 2008 23:59:37 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKpMu-0003vR-DT for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKpMs-0003vF-Vf for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:35 -0400 Received: from [199.232.76.173] (port=60768 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKpMs-0003vC-Pz for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:34 -0400 Received: from mx20.gnu.org ([199.232.41.8]:60022) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KKpMs-0006pD-5s for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:34 -0400 Received: from rv-out-0708.google.com ([209.85.198.248]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKpMq-0000Ei-4m for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:32 -0400 Received: by rv-out-0708.google.com with SMTP id k29so1171026rvb.6 for ; Sun, 20 Jul 2008 23:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:mime-version:content-type; bh=+RaPdjSa+CE4H6KMs3JSMRXMlD7EbFSi96a5Y7LE+2U=; b=vgC+lkaZDlMndSWPQ9oM+W4FAzv3OQ/WdHhdHU8V+A+8c0AlZGwb48OXHJswMkheBB R03uYbdLHiShLqK7hr6UfR7rgCU+5gnsAiuKzTtAZ86Xu7xt//9sVSa/nCGzKJZtrcXC njTIHmKCLcXQWAHBATC/ZngqzsxEXBLu9x9Kk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:mime-version:content-type; b=PLNVK6jWxYuSBh+NvbdTf33Dqif18h7q9LDdK3V1Pf78SWU/c9ELNCPMjDQmOqdkSk BjJ24mz0jzOrvbX/UV4rOemwKdA9xtcjblBrpKBgUy6xXhA99aDwIO1LBszN3j+MDPb9 us9DDoAyBf6xQf92mP+sA/aRZWz/9QDK/AHhM= Received: by 10.141.132.8 with SMTP id j8mr1647031rvn.297.1216623570358; Sun, 20 Jul 2008 23:59:30 -0700 (PDT) Received: by 10.141.204.12 with HTTP; Sun, 20 Jul 2008 23:59:30 -0700 (PDT) Message-ID: Date: Mon, 21 Jul 2008 08:59:30 +0200 From: Fernando To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_66254_24778329.1216623570281" X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) ------=_Part_66254_24778329.1216623570281 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline The XDG Base Directory Specificationprovides some common paths in user's home to store personal application configurations, or, using their own words "*defines where these files should be looked for by defining one or more base directories relative to which files should be located*". XDG Base Directory Specification allows efficient backup, in which you can easily choose to backup your data and/or your configuration files for instance. An application could easily propose such backup for the whole system if all applications were matching these specification. Therefore, although I think that this bug/enhancement is not vital, it would be great for Emacs to be "FreeDesktop XDG Base Directory Specification" compliant. Currently Emacs is using "$HOME/.emacs.d/". This is what XDG basedir spec defines: - $XDG_DATA_HOME (usually $HOME/.local/share/) as "*the base directory relative to which user specific data files should be stored*" - $XDG_CONFIG_HOME (usually $HOME/.config/) as "*the base directory relative to which user specific configuration files should be stored*" - $XDG_CACHE_HOME (usually $HOME/.cache/) as "*the base directory relative to which user specific non-essential data files should be stored *" (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) In order to make Emacs XDG basedir compliant, I think that it would be nice to use: - $XDG_CONFIG_HOME/emacs ;;for "init.el" and storing customize configuration - $XDG_DATA_HOME/emacs ;;for sessions and backups - $XDG_CACHE_HOME/emacs ;;for cache files Or maybe some other distribution. What do you think about it? There's a small C library that may be useful check it out, written for the sole purpose of xdg basedir spec compliance: https://n.ethz.ch/student/nevillm/download/libxdg-basedir/ ------=_Part_66254_24778329.1216623570281 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline

The XDG Base Directory Specification provides some common paths in user's home to store personal application configurations, or, using their own words "defines where these files should be looked for by defining one or more base directories relative to which files should be located".

XDG Base Directory Specification allows efficient backup, in which you can easily choose to backup your data and/or your configuration files for instance. An application could easily propose such backup for the whole system if all applications were matching these specification.

Therefore, although I think that this bug/enhancement is not vital, it would be great for Emacs to be "FreeDesktop XDG Base Directory Specification" compliant. 

Currently Emacs is using "$HOME/.emacs.d/". This is what XDG basedir spec defines:

  • $XDG_DATA_HOME (usually $HOME/.local/share/) as "the base directory relative to which user specific data files should be stored"
  • $XDG_CONFIG_HOME (usually $HOME/.config/) as "the base directory relative to which user specific configuration files should be stored"
  • $XDG_CACHE_HOME (usually $HOME/.cache/) as "the base directory relative to which user specific non-essential data files should be stored"

(http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)

In order to make Emacs XDG basedir compliant, I think that it would be nice to use:

  • $XDG_CONFIG_HOME/emacs  ;;for "init.el" and storing customize configuration
  • $XDG_DATA_HOME/emacs  ;;for sessions and backups
  • $XDG_CACHE_HOME/emacs  ;;for cache files

Or maybe some other distribution. What do you think about it?


There's a small C library that may be useful check it out, written for the sole purpose of xdg basedir spec compliance: https://n.ethz.ch/student/nevillm/download/libxdg-basedir/
------=_Part_66254_24778329.1216623570281-- From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: XDG basedir specification References: In-Reply-To: Resent-From: Eric Heintzmann Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2012 18:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.135499259329804 (code B ref 583); Sat, 08 Dec 2012 18:50:01 +0000 Received: (at 583) by debbugs.gnu.org; 8 Dec 2012 18:49:53 +0000 Received: from localhost ([127.0.0.1]:33171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThPTC-0007kd-T4 for submit@debbugs.gnu.org; Sat, 08 Dec 2012 13:49:53 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:50152) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThJN1-0006E3-Bm for 583@debbugs.gnu.org; Sat, 08 Dec 2012 07:19:06 -0500 Received: from [192.168.0.1] (unknown [78.226.144.120]) by smtp1-g21.free.fr (Postfix) with ESMTP id 51BF9940172 for <583@debbugs.gnu.org>; Sat, 8 Dec 2012 13:18:34 +0100 (CET) Message-ID: <50C33018.60302@free.fr> Date: Sat, 08 Dec 2012 13:18:32 +0100 From: Eric Heintzmann User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.8 (/) X-Mailman-Approved-At: Sat, 08 Dec 2012 13:49:49 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) What is planned now about FreeDesktop XDG basedir specification for Emacs? http://ploum.net/post/207-modify-your-application-to-use-xdg-folders https://live.gnome.org/GnomeGoals/XDGConfigFolders http://standards.freedesktop.org/basedir-spec/latest/ From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: XDG basedir specification Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2012 19:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Heintzmann Cc: 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.135499362231311 (code B ref 583); Sat, 08 Dec 2012 19:08:01 +0000 Received: (at 583) by debbugs.gnu.org; 8 Dec 2012 19:07:02 +0000 Received: from localhost ([127.0.0.1]:33182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThPjp-00088n-Mv for submit@debbugs.gnu.org; Sat, 08 Dec 2012 14:07:01 -0500 Received: from mailout.melmac.se ([62.20.26.67]:55228) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThPjn-00088a-Mz for 583@debbugs.gnu.org; Sat, 08 Dec 2012 14:07:00 -0500 Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 7B0D6964C for <583@debbugs.gnu.org>; Sat, 8 Dec 2012 20:06:33 +0100 (CET) Received: (qmail 14090 invoked by uid 89); 8 Dec 2012 19:06:33 -0000 Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 8 Dec 2012 19:06:33 -0000 Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 278857FA05E; Sat, 8 Dec 2012 20:06:33 +0100 (CET) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Jan =?UTF-8?Q?Dj=C3=A4rv?= In-Reply-To: <50C33018.60302@free.fr> Date: Sat, 8 Dec 2012 20:06:34 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <16704163-3CFA-4D1F-9228-346D19A352CD@swipnet.se> References: <50C33018.60302@free.fr> X-Mailer: Apple Mail (2.1499) X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 8 dec 2012 kl. 13:18 skrev Eric Heintzmann : > What is planned now about FreeDesktop XDG basedir specification for Emacs? > > > http://ploum.net/post/207-modify-your-application-to-use-xdg-folders > https://live.gnome.org/GnomeGoals/XDGConfigFolders > http://standards.freedesktop.org/basedir-spec/latest/ [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4998] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 8 dec 2012 kl. 13:18 skrev Eric Heintzmann : > What is planned now about FreeDesktop XDG basedir specification for Emacs? > > > http://ploum.net/post/207-modify-your-application-to-use-xdg-folders > https://live.gnome.org/GnomeGoals/XDGConfigFolders > http://standards.freedesktop.org/basedir-spec/latest/ [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4123] 8 dec 2012 kl. 13:18 skrev Eric Heintzmann : > What is planned now about FreeDesktop XDG basedir specification for = Emacs? >=20 >=20 > http://ploum.net/post/207-modify-your-application-to-use-xdg-folders > https://live.gnome.org/GnomeGoals/XDGConfigFolders > http://standards.freedesktop.org/basedir-spec/latest/ Hopefully nothing, as the free desktop specs in this area keeps changing = and never reach a stable state. Jan D. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: XDG basedir specification Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2012 19:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Cc: Heintzmann.Eric@free.fr, 583@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 583-submit@debbugs.gnu.org id=B583.13549951071028 (code B ref 583); Sat, 08 Dec 2012 19:32:02 +0000 Received: (at 583) by debbugs.gnu.org; 8 Dec 2012 19:31:47 +0000 Received: from localhost ([127.0.0.1]:33199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThQ7m-0000GX-Ob for submit@debbugs.gnu.org; Sat, 08 Dec 2012 14:31:47 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:54607) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThQ7k-0000GO-Bi for 583@debbugs.gnu.org; Sat, 08 Dec 2012 14:31:45 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MEQ005008RU0000@a-mtaout22.012.net.il> for 583@debbugs.gnu.org; Sat, 08 Dec 2012 21:31:17 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MEQ0041H8W464C0@a-mtaout22.012.net.il>; Sat, 08 Dec 2012 21:31:17 +0200 (IST) Date: Sat, 08 Dec 2012 21:31:02 +0200 From: Eli Zaretskii In-reply-to: <16704163-3CFA-4D1F-9228-346D19A352CD@swipnet.se> Message-id: <83pq2kcpe1.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <50C33018.60302@free.fr> <16704163-3CFA-4D1F-9228-346D19A352CD@swipnet.se> X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Jan Dj=E4rv > Date: Sat, 8 Dec 2012 20:06:34 +0100 > Cc: 583@debbugs.gnu.org >=20 > 8 dec 2012 kl. 13:18 skrev Eric Heintzmann : >=20 > > What is planned now about FreeDesktop XDG basedir specification f= or Emacs? > >=20 > >=20 > > http://ploum.net/post/207-modify-your-application-to-use-xdg-fold= ers > > https://live.gnome.org/GnomeGoals/XDGConfigFolders > > http://standards.freedesktop.org/basedir-spec/latest/ >=20 > Hopefully nothing, as the free desktop specs in this area keeps cha= nging and never reach a stable state. I agree, FWIW. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 12:04:22 2013 Received: (at control) by debbugs.gnu.org; 21 Oct 2013 16:04:22 +0000 Received: from localhost ([127.0.0.1]:60958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYHxu-0001Qi-0R for submit@debbugs.gnu.org; Mon, 21 Oct 2013 12:04:22 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:50909 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYHxs-0001Qb-Rq for control@debbugs.gnu.org; Mon, 21 Oct 2013 12:04:21 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VYHxs-0006px-5w for control@debbugs.gnu.org; Mon, 21 Oct 2013 12:04:20 -0400 Date: Mon, 21 Oct 2013 12:04:20 -0400 Message-Id: Subject: control message for bug 583 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) forwarded 583 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00637.html From unknown Sat Aug 16 11:42:16 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: ferkiwi+a@gmail.com Subject: bug#583: closed (Re: Use XDG basedir spec for configuration files?) Message-ID: References: X-Gnu-PR-Message: they-closed 583 X-Gnu-PR-Package: emacs Reply-To: 583@debbugs.gnu.org Date: Tue, 27 Aug 2019 21:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1566943142-7992-1" This is a multi-part message in MIME format... ------------=_1566943142-7992-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #583: Use XDG basedir spec for configuration files? which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 583@debbugs.gnu.org. --=20 583: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D583 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1566943142-7992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 583-done) by debbugs.gnu.org; 27 Aug 2019 21:58:05 +0000 Received: from localhost ([127.0.0.1]:49507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2jTZ-00023C-06 for submit@debbugs.gnu.org; Tue, 27 Aug 2019 17:58:05 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2jTW-00022d-Ue for 583-done@debbugs.gnu.org; Tue, 27 Aug 2019 17:58:03 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4E8951600C6; Tue, 27 Aug 2019 14:57:57 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id btLR6gP1qptr; Tue, 27 Aug 2019 14:57:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4DD561600EC; Tue, 27 Aug 2019 14:57:56 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FNgOW9fJWR3Q; Tue, 27 Aug 2019 14:57:56 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1B92A1600C6; Tue, 27 Aug 2019 14:57:56 -0700 (PDT) To: ferkiwi+a@gmail.com From: Paul Eggert Subject: Re: Use XDG basedir spec for configuration files? Organization: UCLA Computer Science Department Message-ID: Date: Tue, 27 Aug 2019 14:57:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: 583-done Cc: 583-done@debbugs.gnu.org, Eli Zaretskii , =?UTF-8?Q?Jan_Dj=c3=a4rv?= , Eric Heintzmann X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) After discussion we added something along the suggested lines to Emacs master here: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4118297ae2fab4886b20d193ba511a229637aea3 so I am closing bug report number 583. ------------=_1566943142-7992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From ferkiwi@gmail.com Sun Jul 20 23:59:46 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-0.4 required=4.0 tests=BAYES_20,FOURLA,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jul 2008 06:59:46 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6L6xaM4001882 for ; Sun, 20 Jul 2008 23:59:37 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKpMu-0003vR-DT for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKpMs-0003vF-Vf for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:35 -0400 Received: from [199.232.76.173] (port=60768 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKpMs-0003vC-Pz for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:34 -0400 Received: from mx20.gnu.org ([199.232.41.8]:60022) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KKpMs-0006pD-5s for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:34 -0400 Received: from rv-out-0708.google.com ([209.85.198.248]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKpMq-0000Ei-4m for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2008 02:59:32 -0400 Received: by rv-out-0708.google.com with SMTP id k29so1171026rvb.6 for ; Sun, 20 Jul 2008 23:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:mime-version:content-type; bh=+RaPdjSa+CE4H6KMs3JSMRXMlD7EbFSi96a5Y7LE+2U=; b=vgC+lkaZDlMndSWPQ9oM+W4FAzv3OQ/WdHhdHU8V+A+8c0AlZGwb48OXHJswMkheBB R03uYbdLHiShLqK7hr6UfR7rgCU+5gnsAiuKzTtAZ86Xu7xt//9sVSa/nCGzKJZtrcXC njTIHmKCLcXQWAHBATC/ZngqzsxEXBLu9x9Kk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:mime-version:content-type; b=PLNVK6jWxYuSBh+NvbdTf33Dqif18h7q9LDdK3V1Pf78SWU/c9ELNCPMjDQmOqdkSk BjJ24mz0jzOrvbX/UV4rOemwKdA9xtcjblBrpKBgUy6xXhA99aDwIO1LBszN3j+MDPb9 us9DDoAyBf6xQf92mP+sA/aRZWz/9QDK/AHhM= Received: by 10.141.132.8 with SMTP id j8mr1647031rvn.297.1216623570358; Sun, 20 Jul 2008 23:59:30 -0700 (PDT) Received: by 10.141.204.12 with HTTP; Sun, 20 Jul 2008 23:59:30 -0700 (PDT) Message-ID: Date: Mon, 21 Jul 2008 08:59:30 +0200 From: Fernando Reply-To: ferkiwi+a@gmail.com To: bug-gnu-emacs@gnu.org Subject: Use XDG basedir spec for configuration files? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_66254_24778329.1216623570281" X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) ------=_Part_66254_24778329.1216623570281 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline The XDG Base Directory Specificationprovides some common paths in user's home to store personal application configurations, or, using their own words "*defines where these files should be looked for by defining one or more base directories relative to which files should be located*". XDG Base Directory Specification allows efficient backup, in which you can easily choose to backup your data and/or your configuration files for instance. An application could easily propose such backup for the whole system if all applications were matching these specification. Therefore, although I think that this bug/enhancement is not vital, it would be great for Emacs to be "FreeDesktop XDG Base Directory Specification" compliant. Currently Emacs is using "$HOME/.emacs.d/". This is what XDG basedir spec defines: - $XDG_DATA_HOME (usually $HOME/.local/share/) as "*the base directory relative to which user specific data files should be stored*" - $XDG_CONFIG_HOME (usually $HOME/.config/) as "*the base directory relative to which user specific configuration files should be stored*" - $XDG_CACHE_HOME (usually $HOME/.cache/) as "*the base directory relative to which user specific non-essential data files should be stored *" (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) In order to make Emacs XDG basedir compliant, I think that it would be nice to use: - $XDG_CONFIG_HOME/emacs ;;for "init.el" and storing customize configuration - $XDG_DATA_HOME/emacs ;;for sessions and backups - $XDG_CACHE_HOME/emacs ;;for cache files Or maybe some other distribution. What do you think about it? There's a small C library that may be useful check it out, written for the sole purpose of xdg basedir spec compliance: https://n.ethz.ch/student/nevillm/download/libxdg-basedir/ ------=_Part_66254_24778329.1216623570281 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline

The XDG Base Directory Specification provides some common paths in user's home to store personal application configurations, or, using their own words "defines where these files should be looked for by defining one or more base directories relative to which files should be located".

XDG Base Directory Specification allows efficient backup, in which you can easily choose to backup your data and/or your configuration files for instance. An application could easily propose such backup for the whole system if all applications were matching these specification.

Therefore, although I think that this bug/enhancement is not vital, it would be great for Emacs to be "FreeDesktop XDG Base Directory Specification" compliant. 

Currently Emacs is using "$HOME/.emacs.d/". This is what XDG basedir spec defines:

  • $XDG_DATA_HOME (usually $HOME/.local/share/) as "the base directory relative to which user specific data files should be stored"
  • $XDG_CONFIG_HOME (usually $HOME/.config/) as "the base directory relative to which user specific configuration files should be stored"
  • $XDG_CACHE_HOME (usually $HOME/.cache/) as "the base directory relative to which user specific non-essential data files should be stored"

(http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)

In order to make Emacs XDG basedir compliant, I think that it would be nice to use:

  • $XDG_CONFIG_HOME/emacs  ;;for "init.el" and storing customize configuration
  • $XDG_DATA_HOME/emacs  ;;for sessions and backups
  • $XDG_CACHE_HOME/emacs  ;;for cache files

Or maybe some other distribution. What do you think about it?


There's a small C library that may be useful check it out, written for the sole purpose of xdg basedir spec compliance: https://n.ethz.ch/student/nevillm/download/libxdg-basedir/
------=_Part_66254_24778329.1216623570281-- ------------=_1566943142-7992-1-- From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2019 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 583@debbugs.gnu.org Cc: ferkiwi+a@gmail.com, eggert@cs.ucla.edu Received: via spool by 583-submit@debbugs.gnu.org id=B583.15670086922338 (code B ref 583); Wed, 28 Aug 2019 16:12:02 +0000 Received: (at 583) by debbugs.gnu.org; 28 Aug 2019 16:11:32 +0000 Received: from localhost ([127.0.0.1]:51130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i30Xj-0000be-Vy for submit@debbugs.gnu.org; Wed, 28 Aug 2019 12:11:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i30Xg-0000bN-OR for 583@debbugs.gnu.org; Wed, 28 Aug 2019 12:11:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i30Xb-0005EC-8v; Wed, 28 Aug 2019 12:11:23 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i30XZ-0003FQ-D5; Wed, 28 Aug 2019 12:11:21 -0400 From: Glenn Morris References: X-Spook: Emergency Landing Crest Al-Qaeda JFK Tamil Tigers X-Ran: .b7V-VMO4u=`m`4#AZf4K4U0Ft\zI]D6)m(cb04F"3(V{}r%FwyI0~" X-Hue: black X-Attribution: GM Date: Wed, 28 Aug 2019 12:11:21 -0400 In-Reply-To: (Paul Eggert's message of "Tue, 27 Aug 2019 14:57:55 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) It's great to finally see some progress in this area, but IIUC this is still not really following the XDG spec. For example, I think a proper solution would see user elpa packages stored undo XDG_DATA_HOME, etc. I think the OP points this out. It looks like what we have at the moment is basically ~/.emacs.d/ -> ~/.config/emacs/? From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2019 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: eggert@cs.ucla.edu, ferkiwi+a@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15670097884499 (code B ref 583); Wed, 28 Aug 2019 16:30:02 +0000 Received: (at 583) by debbugs.gnu.org; 28 Aug 2019 16:29:48 +0000 Received: from localhost ([127.0.0.1]:51150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i30pP-0001AT-RF for submit@debbugs.gnu.org; Wed, 28 Aug 2019 12:29:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i30pO-0001AE-08 for 583@debbugs.gnu.org; Wed, 28 Aug 2019 12:29:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i30pI-0001mg-LB; Wed, 28 Aug 2019 12:29:40 -0400 Received: from [176.228.60.248] (port=2630 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i30pH-00048K-GI; Wed, 28 Aug 2019 12:29:39 -0400 Date: Wed, 28 Aug 2019 19:29:45 +0300 Message-Id: <83zhjtb6di.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Glenn Morris on Wed, 28 Aug 2019 12:11:21 -0400) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Glenn Morris > Date: Wed, 28 Aug 2019 12:11:21 -0400 > Cc: ferkiwi+a@gmail.com, eggert@cs.ucla.edu > > It's great to finally see some progress in this area, but IIUC this is > still not really following the XDG spec. For example, I think a proper > solution would see user elpa packages stored undo XDG_DATA_HOME, etc. Yes, because we don't set user-emacs-directory from XDG_DATA_HOME. We only load the init files from there. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2019 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: eggert@cs.ucla.edu, ferkiwi+a@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15670110576939 (code B ref 583); Wed, 28 Aug 2019 16:51:02 +0000 Received: (at 583) by debbugs.gnu.org; 28 Aug 2019 16:50:57 +0000 Received: from localhost ([127.0.0.1]:51172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i319t-0001nr-2V for submit@debbugs.gnu.org; Wed, 28 Aug 2019 12:50:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i319q-0001na-9f for 583@debbugs.gnu.org; Wed, 28 Aug 2019 12:50:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i319k-0007Bh-Pv; Wed, 28 Aug 2019 12:50:48 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i319i-0007Vw-L8; Wed, 28 Aug 2019 12:50:46 -0400 From: Glenn Morris References: <83zhjtb6di.fsf@gnu.org> X-Spook: Shots fired Critical Infrastructure & Key Resources Bush X-Ran: c(h8,7k\v{k?\9xbg^$aGFk2IQBe_oo2eNP"cEA4"+$O1;Uz.xc=*CyKytmjv?_Hv2iGpe X-Hue: cyan X-Attribution: GM Date: Wed, 28 Aug 2019 12:50:46 -0400 In-Reply-To: <83zhjtb6di.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Aug 2019 19:29:45 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii wrote: >> It's great to finally see some progress in this area, but IIUC this is >> still not really following the XDG spec. For example, I think a proper >> solution would see user elpa packages stored undo XDG_DATA_HOME, etc. > > Yes, because we don't set user-emacs-directory from XDG_DATA_HOME. We > only load the init files from there. I'm not sure I've made my point. With a proper following of the XDG spec, the concept of (a single) "user-emacs-directory" would no longer be present. Obviously this requires more radical changes. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2019 17:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: eggert@cs.ucla.edu, ferkiwi+a@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15670127279911 (code B ref 583); Wed, 28 Aug 2019 17:19:01 +0000 Received: (at 583) by debbugs.gnu.org; 28 Aug 2019 17:18:47 +0000 Received: from localhost ([127.0.0.1]:51181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i31ap-0002Zn-KQ for submit@debbugs.gnu.org; Wed, 28 Aug 2019 13:18:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i31am-0002ZX-TO for 583@debbugs.gnu.org; Wed, 28 Aug 2019 13:18:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i31ag-00072b-Mo; Wed, 28 Aug 2019 13:18:38 -0400 Received: from [176.228.60.248] (port=1620 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i31af-00032n-MP; Wed, 28 Aug 2019 13:18:38 -0400 Date: Wed, 28 Aug 2019 20:18:42 +0300 Message-Id: <83y2zdb43x.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Glenn Morris on Wed, 28 Aug 2019 12:50:46 -0400) References: <83zhjtb6di.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Glenn Morris > Cc: 583@debbugs.gnu.org, ferkiwi+a@gmail.com, eggert@cs.ucla.edu > Date: Wed, 28 Aug 2019 12:50:46 -0400 > > With a proper following of the XDG spec, the concept of (a single) > "user-emacs-directory" would no longer be present. I'm not sure I understand why. Can you tell more? (I know very little about XDG.) From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2019 18:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156701591415132 (code B ref 583); Wed, 28 Aug 2019 18:12:01 +0000 Received: (at 583) by debbugs.gnu.org; 28 Aug 2019 18:11:54 +0000 Received: from localhost ([127.0.0.1]:51195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i32QD-0003w0-Pm for submit@debbugs.gnu.org; Wed, 28 Aug 2019 14:11:54 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i32QC-0003vl-GB for 583@debbugs.gnu.org; Wed, 28 Aug 2019 14:11:53 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E2F4716005F; Wed, 28 Aug 2019 11:11:46 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id e0pr0W56dqA8; Wed, 28 Aug 2019 11:11:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 223241600EC; Wed, 28 Aug 2019 11:11:46 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OIs9f0NytS6J; Wed, 28 Aug 2019 11:11:46 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EC212160062; Wed, 28 Aug 2019 11:11:45 -0700 (PDT) References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> Date: Wed, 28 Aug 2019 11:11:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Glenn Morris wrote: > It's great to finally see some progress in this area, but IIUC this is > still not really following the XDG spec. For example, I think a proper > solution would see user elpa packages stored undo XDG_DATA_HOME, etc. > I think the OP points this out. > It looks like what we have at the moment is basically > ~/.emacs.d/ -> ~/.config/emacs/? Yes, that's what Emacs basically has in master now. I don't see where Fernando mentioned ELPA, though. And it's not clear that an ELPA package's files should be considered "user specific data files" (XDG_DATA_HOME) as opposed to "user specific configuration files" (XDG_CONFIG_HOME). Looking at my own home directory for what other XDG-ish programs do, I see data files under ~/.local/share (XDG_DATA_FILES default): things like xorg/Xorg.0.log, gnome-shell/application_state, gvfs-metadata/home, and evolution/addressbook/system/contacts.db. Programs (if any) are few and far between. (Not that I use many plugins in any programs, so perhaps I'm not the best person to check this.) For what it's worth, I found an old directory named '~/.gimp-2.8' and a newer one named '~/.config/GIMP/2.10' with similar structure. It appears that when GIMP made the transition to XDG style in GIMP version 2.9.2, it did what Emacs just did in master now: that is, GIMP moved all its stuff into ~/config/GIMP. Although I don't use GIMP plug-ins, the GIMP plug-ins directory moved too. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 02:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156704485517145 (code B ref 583); Thu, 29 Aug 2019 02:15:01 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 02:14:15 +0000 Received: from localhost ([127.0.0.1]:51444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i39x1-0004ST-0D for submit@debbugs.gnu.org; Wed, 28 Aug 2019 22:14:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i39wz-0004SH-So for 583@debbugs.gnu.org; Wed, 28 Aug 2019 22:14:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i39wu-0000NI-FO; Wed, 28 Aug 2019 22:14:08 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i39wt-0005tx-Gv; Wed, 28 Aug 2019 22:14:07 -0400 From: Glenn Morris References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> X-Spook: kilo class fundamentalist plutonium Malware al-Qaida X-Ran: z0PC$vuJF="yy<}]KKtCH$)v`5!_=1>@.>bl]%_}"tU*1952/$5(E4sFV*Tu/j,$zUZ (Paul Eggert's message of "Wed, 28 Aug 2019 11:11:45 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Paul Eggert wrote: >> ~/.emacs.d/ -> ~/.config/emacs/? > > Yes, that's what Emacs basically has in master now. I don't see where > Fernando mentioned ELPA, though. He didn't. Elpa may not even have existed when this report was opened. I was using it as an example. > And it's not clear that an ELPA package's files should be considered > "user specific data files" (XDG_DATA_HOME) as opposed to "user > specific configuration files" (XDG_CONFIG_HOME). It seems clear to me. They are data, not configuration. You would not install them under /etc, but somewhere like /usr/share. > For what it's worth, I found an old directory named '~/.gimp-2.8' and > a newer one named '~/.config/GIMP/2.10' with similar structure. It > appears that when GIMP made the transition to XDG style in GIMP > version 2.9.2, it did what Emacs just did in master now: that is, GIMP > moved all its stuff into ~/config/GIMP. Although I don't use GIMP > plug-ins, the GIMP plug-ins directory moved too. IMO "dump everything under ~/.config/emacs" isn't a proper implementation, even if some other packages have done this. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 02:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: eggert@cs.ucla.edu, ferkiwi+a@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156704508317664 (code B ref 583); Thu, 29 Aug 2019 02:19:02 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 02:18:03 +0000 Received: from localhost ([127.0.0.1]:51448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3A0h-0004ap-Hp for submit@debbugs.gnu.org; Wed, 28 Aug 2019 22:18:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3A0g-0004aL-Bq for 583@debbugs.gnu.org; Wed, 28 Aug 2019 22:18:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3A0b-0001wb-86; Wed, 28 Aug 2019 22:17:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i3A0Z-00069e-BC; Wed, 28 Aug 2019 22:17:55 -0400 From: Glenn Morris References: <83zhjtb6di.fsf@gnu.org> <83y2zdb43x.fsf@gnu.org> X-Spook: insurgency afsatcom Israel Influenza Craig Livingstone X-Ran: pq)~Yc\V\Mg1f/6agk3rhHkoeHOEOC[1;NUiYhzz%xt-+5kV3h5%K@s4O^b,N`17(~7wea X-Hue: brightgreen X-Attribution: GM Date: Wed, 28 Aug 2019 22:17:55 -0400 In-Reply-To: <83y2zdb43x.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 Aug 2019 20:18:42 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii wrote: >> From: Glenn Morris >> Cc: 583@debbugs.gnu.org, ferkiwi+a@gmail.com, eggert@cs.ucla.edu >> Date: Wed, 28 Aug 2019 12:50:46 -0400 >> >> With a proper following of the XDG spec, the concept of (a single) >> "user-emacs-directory" would no longer be present. > > I'm not sure I understand why. Can you tell more? (I know very > little about XDG.) It's well documented, the link in the OP still works. See also eg https://wiki.archlinux.org/index.php/XDG_Base_Directory IMO a true conversion of Emacs to the XDG spec would involve the addition of new variables (user-config-directory, user-data-directory, user-cache-directory, etc). Each use of user-emacs-directory would have to be reviewed to see where it actually belongs. For some, it would probably be ambiguous. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 06:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15670597659735 (code B ref 583); Thu, 29 Aug 2019 06:23:02 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 06:22:45 +0000 Received: from localhost ([127.0.0.1]:51508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3DpV-0002Wx-GI for submit@debbugs.gnu.org; Thu, 29 Aug 2019 02:22:45 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3DpS-0002Wi-Mf for 583@debbugs.gnu.org; Thu, 29 Aug 2019 02:22:43 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C9726160056; Wed, 28 Aug 2019 23:22:36 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zhCQ9YXVRD6j; Wed, 28 Aug 2019 23:22:35 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D7FB0160062; Wed, 28 Aug 2019 23:22:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Gr9TqmRNZdUQ; Wed, 28 Aug 2019 23:22:35 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AFBD6160056; Wed, 28 Aug 2019 23:22:35 -0700 (PDT) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> Date: Wed, 28 Aug 2019 23:22:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Glenn Morris wrote: >> And it's not clear that an ELPA package's files should be considered >> "user specific data files" (XDG_DATA_HOME) as opposed to "user >> specific configuration files" (XDG_CONFIG_HOME). > It seems clear to me. They are data, not configuration. You would not > install them under /etc, but somewhere like /usr/share. If I understand correctly, ELPA packages are not really either "data" or "configuration": they're software packages. And the XDG scheme doesn't appear to be designed for installing software packages: it's designed only for user preferences (aka configuration), user data, and information cached for the user. If ELPA packages are just local copies from a server somewhere, it seems the most plausible place for them is the XDG cache (XDG_CACHE_HOME, which is ~/.cache by default) rather than either in "data" or "configuration"; only the list of downloaded packages should be placed in XDG_CONFIG_HOME. Presumably the ELPA package manager could arrange for this. Not being an expert in these matters, I looked at another popular packaging scheme: Flatpak. It appears to put everything under ~/.local/share, i.e., under XDG_DATA_HOME. This includes configuration. See . It's quite a mess, huh? From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 07:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: eggert@cs.ucla.edu, ferkiwi+a@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156706223813815 (code B ref 583); Thu, 29 Aug 2019 07:04:02 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 07:03:58 +0000 Received: from localhost ([127.0.0.1]:51522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3ETO-0003ak-En for submit@debbugs.gnu.org; Thu, 29 Aug 2019 03:03:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3ETM-0003aX-Af for 583@debbugs.gnu.org; Thu, 29 Aug 2019 03:03:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3ETG-00088N-Rb; Thu, 29 Aug 2019 03:03:50 -0400 Received: from [176.228.60.248] (port=4181 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i3ETD-0006AW-Jq; Thu, 29 Aug 2019 03:03:48 -0400 Date: Thu, 29 Aug 2019 10:03:53 +0300 Message-Id: <83mufsbgh2.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Glenn Morris on Wed, 28 Aug 2019 22:17:55 -0400) References: <83zhjtb6di.fsf@gnu.org> <83y2zdb43x.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Glenn Morris > Cc: 583@debbugs.gnu.org, ferkiwi+a@gmail.com, eggert@cs.ucla.edu > Date: Wed, 28 Aug 2019 22:17:55 -0400 > > IMO a true conversion of Emacs to the XDG spec would involve the > addition of new variables (user-config-directory, user-data-directory, > user-cache-directory, etc). Each use of user-emacs-directory would have > to be reviewed to see where it actually belongs. For some, it would > probably be ambiguous. I'm afraid almost all of them will be ambiguous. Moreover, defining a clear enough set of rules for where to put files that will be added in the future is a non-trivial job, and enforcing it will not be easy. I predict confusion and arguments. My gut feeling is that Emacs should have one, at most 2 XDG-derived directories, certainly not 3. And if we want to support that correctly, these environment variables should be accessed much earlier in the startup process, somewhere in init_callproc and friends, because setting user-emacs-directory in startup is too late and creates problems, as we saw already. We've made a small step in that direction; if we want to continue that way, someone should volunteer to do the job of defining what files will go were. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 08:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Glenn Morris , ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156706815624626 (code B ref 583); Thu, 29 Aug 2019 08:43:01 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 08:42:36 +0000 Received: from localhost ([127.0.0.1]:51590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3G0q-0006P6-5A for submit@debbugs.gnu.org; Thu, 29 Aug 2019 04:42:36 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:39509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3G0n-0006On-U5 for 583@debbugs.gnu.org; Thu, 29 Aug 2019 04:42:34 -0400 Received: by mail-wm1-f54.google.com with SMTP id n2so1511499wmk.4 for <583@debbugs.gnu.org>; Thu, 29 Aug 2019 01:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=TlPtd5PC81geGgOZwwJG2SdcBws/H7d+p9tIs63y/1w=; b=kUcj6pwwM+/d1APv17cOtZAK+/ZlpQbERYMDDMIOxHHioGKt10caUUno9ZH69JNPY4 b1WoSuP4w6ynvNkZ8V5OunvlbTu3xnSQE3VkRLNLRYB8vQx13Ee5HHyzMbnmx7QE8NJj rAbbfgInmEy0oL0yZBsz+hhz6tzFnouqkSs1DLU2uzz2y8vmjt3uW0YErfytva7izmEX 7OyLI5TW926FvTh+OeZ6TiFjiZrV+Cz/IvBNMin9ldxLllIcqe47d9cCYw+9XSOADxgk HITbIlUpE3SlGW09u0r94VQ6WdROIvbsiReWf8rRAfuMLa2HVmkiK3174t28E1ch8WTH cPkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=TlPtd5PC81geGgOZwwJG2SdcBws/H7d+p9tIs63y/1w=; b=Pb+9H+RN/xTAwjpuGPN4A1k2O029qu6RSmJ4lHr+jcH2Kf4dHiCplXFt78HWXVILnJ SefRm5WThsXMTT1x1kuOFzwxa88+jVz9UOv9F5dOGoh1qOuCd54MeuTJ7RaNR6dA6JgZ N/T7OKqb17tNrzysCBVk6AVCshYRoZ8k8/36MZ4qTZZghg4n9e5skoCxIg0Dif7m6ZP5 a7ox++ILPLn6P04cY6EniczwmRg4Rb3z83a3bW9RxwfBoRKnkNDI5zxpcgQT0KK8KZxk Gmvi56nK4n7OEzl8nmZOfEmmS8Ml63ZiPTNxZmx23RU5cvcULDnoIn5/+J67TWBZi+a9 cP/A== X-Gm-Message-State: APjAAAUB1ISQamVsAyH4x1Ub4zby3ckHc/4dW7enLCpNwM224U95o3SO EJrRRgTTGjCHHR1VyqnQ7/o= X-Google-Smtp-Source: APXvYqz0yerygpgLd38Q1/Fev8HhDmzNsKZnD+7mqF70C0pbyLeI9RVaW3ArCi0tdqtMvqDz83yfZg== X-Received: by 2002:a1c:f516:: with SMTP id t22mr8267755wmh.110.1567068148021; Thu, 29 Aug 2019 01:42:28 -0700 (PDT) Received: from localhost ([185.112.167.114]) by smtp.gmail.com with ESMTPSA id 6sm1848374wmf.23.2019.08.29.01.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 01:42:27 -0700 (PDT) From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= In-Reply-To: <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> (Paul Eggert's message of "Wed, 28 Aug 2019 23:22:35 -0700") References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Thu, 29 Aug 2019 10:42:26 +0200 Message-ID: <87y2zcfjm5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 28 Aug 2019 23:22:35 -0700 Paul Eggert wrote: > If ELPA packages are just local copies from a server somewhere, it > seems the most plausible place for them is the XDG cache > (XDG_CACHE_HOME, which is ~/.cache by default) rather than either in > "data" or "configuration"; only the list of downloaded packages should > be placed in XDG_CONFIG_HOME. Presumably the ELPA package manager > could arrange for this. XDG_CACHE_HOME is for "non-essential data files" (quoting the spec). Some people put it on tmpfs, so it is deleted on system restart. > Not being an expert in these matters, I looked at another popular > packaging scheme: Flatpak. It appears to put everything under > ~/.local/share, i.e., under XDG_DATA_HOME. This includes > configuration. See > . Some programs (notably Python[1]) use ~/.local/lib/, which makes sense, but is not part of the XDG spec. > It's quite a mess, huh? It is. [1] https://www.python.org/dev/peps/pep-0370/ --=20 =C5=A0t=C4=9Bp=C3=A1n From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15671034651611 (code B ref 583); Thu, 29 Aug 2019 18:32:01 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 18:31:05 +0000 Received: from localhost ([127.0.0.1]:52898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3PCK-0000Pv-PD for submit@debbugs.gnu.org; Thu, 29 Aug 2019 14:31:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3PCI-0000PQ-Ey for 583@debbugs.gnu.org; Thu, 29 Aug 2019 14:31:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3PCC-0001Nd-Qi; Thu, 29 Aug 2019 14:30:56 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i3PCA-0001ZA-Kv; Thu, 29 Aug 2019 14:30:54 -0400 From: Glenn Morris References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> X-Spook: Air borne ASDIC Bosnia Defcon Mysql injection San Diego X-Ran: :F:fB1dVA'&Lk&**0p5p~~]PwiljH.{t:)CJ8LuR-GyRWosfG&v|5>_6Ej (Paul Eggert's message of "Wed, 28 Aug 2019 23:22:35 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) BTW, I think the handling of user-emacs-directory is buggy: rm -rf /tmp/foo mkdir -p /tmp/foo/.config/emacs HOME=/tmp/foo emacs Now: user-init-file -> /tmp/foo/.config/emacs/init user-emacs-directory -> ~/.emacs.d/ I guess user-emacs-directory is being set at build time, not run time. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15671037602046 (code B ref 583); Thu, 29 Aug 2019 18:36:02 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 18:36:00 +0000 Received: from localhost ([127.0.0.1]:52903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3PH6-0000Wv-C6 for submit@debbugs.gnu.org; Thu, 29 Aug 2019 14:36:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3PH4-0000Wc-NV for 583@debbugs.gnu.org; Thu, 29 Aug 2019 14:35:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3PGy-0007QR-OC; Thu, 29 Aug 2019 14:35:52 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i3PGw-0003lw-J0; Thu, 29 Aug 2019 14:35:50 -0400 From: Glenn Morris References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> X-Spook: Suspicious substance BCCI DNDO David John Oates munitions X-Ran: RB{'1}3AB$yK(T^T[psz>|fd5jNv$mZu47NgcRbnjZVz'?kS+9{p3Re=tD6.A7\Pp8E-Xl X-Hue: brightcyan X-Attribution: GM Date: Thu, 29 Aug 2019 14:35:50 -0400 In-Reply-To: (Glenn Morris's message of "Thu, 29 Aug 2019 14:30:54 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) PS I should have prefaced this recipe with "having built Emacs in an environment where ~/.config/emacs does not exist". From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2019 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: eggert@cs.ucla.edu, ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15671048093813 (code B ref 583); Thu, 29 Aug 2019 18:54:02 +0000 Received: (at 583) by debbugs.gnu.org; 29 Aug 2019 18:53:29 +0000 Received: from localhost ([127.0.0.1]:52907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3PY0-0000zR-TR for submit@debbugs.gnu.org; Thu, 29 Aug 2019 14:53:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3PXz-0000z9-40 for 583@debbugs.gnu.org; Thu, 29 Aug 2019 14:53:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3PXt-0008QK-JL; Thu, 29 Aug 2019 14:53:21 -0400 Received: from [176.228.60.248] (port=4093 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i3PXq-00054y-Ad; Thu, 29 Aug 2019 14:53:19 -0400 Date: Thu, 29 Aug 2019 21:53:25 +0300 Message-Id: <83v9ufajmi.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Glenn Morris on Thu, 29 Aug 2019 14:30:54 -0400) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Glenn Morris > Date: Thu, 29 Aug 2019 14:30:54 -0400 > Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org > > rm -rf /tmp/foo > mkdir -p /tmp/foo/.config/emacs > HOME=/tmp/foo emacs > > Now: > user-init-file -> /tmp/foo/.config/emacs/init > user-emacs-directory -> ~/.emacs.d/ > > I guess user-emacs-directory is being set at build time, not run time. It's a defconst in subr.el, and I believe one of my review comments for the initial version of the patch was that I didn't think using defconst for this was correct. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2019 08:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156715217725818 (code B ref 583); Fri, 30 Aug 2019 08:03:02 +0000 Received: (at 583) by debbugs.gnu.org; 30 Aug 2019 08:02:57 +0000 Received: from localhost ([127.0.0.1]:53245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3bs0-0006iL-Ri for submit@debbugs.gnu.org; Fri, 30 Aug 2019 04:02:57 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3brz-0006i5-9o for 583@debbugs.gnu.org; Fri, 30 Aug 2019 04:02:55 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 598411600A3; Fri, 30 Aug 2019 01:02:48 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id EFDO3ublxgQX; Fri, 30 Aug 2019 01:02:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AB4BB1600AD; Fri, 30 Aug 2019 01:02:47 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o2QMRXMVy77w; Fri, 30 Aug 2019 01:02:47 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 84EC41600A3; Fri, 30 Aug 2019 01:02:47 -0700 (PDT) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> Date: Fri, 30 Aug 2019 01:02:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Glenn Morris wrote: > BTW, I think the handling of user-emacs-directory is buggy: Yes, it is. I'll have to take a look at that. I guess we'll have to change user-home-directory to a variable, since we can't easily determine it until command-line runs. Also, a good many places in the documentaiton refer to ~/.emacs.d and these need to be updated. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2019 16:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15671819301129 (code B ref 583); Fri, 30 Aug 2019 16:19:01 +0000 Received: (at 583) by debbugs.gnu.org; 30 Aug 2019 16:18:50 +0000 Received: from localhost ([127.0.0.1]:54767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3jbu-0000I8-BS for submit@debbugs.gnu.org; Fri, 30 Aug 2019 12:18:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3jbs-0000Hu-I1 for 583@debbugs.gnu.org; Fri, 30 Aug 2019 12:18:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3jbm-0000mv-7i; Fri, 30 Aug 2019 12:18:42 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1i3jbk-0004t0-Cr; Fri, 30 Aug 2019 12:18:40 -0400 From: Glenn Morris References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> X-Spook: National laboratory Social media mania Mantis X-Ran: UY&+lI1NC7$6"EeK*#Ra\bsQ/9t.drpN.@^=*u>.>4R'zyy{hQD:'utV{_,.-aulc28y?w X-Hue: red X-Attribution: GM Date: Fri, 30 Aug 2019 12:18:40 -0400 In-Reply-To: <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> (Paul Eggert's message of "Fri, 30 Aug 2019 01:02:44 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Paul Eggert wrote: >> BTW, I think the handling of user-emacs-directory is buggy: > > Yes, it is. I'll have to take a look at that. I guess we'll have to > change user-home-directory to a variable, since we can't easily > determine it until command-line runs. > > Also, a good many places in the documentaiton refer to ~/.emacs.d and > these need to be updated. IMO this means one should allow a user-defined user-emacs-directory, which means un-wontfix'ing https://debbugs.gnu.org/15539 . Maybe the patch in https://debbugs.gnu.org/15539#40 contains some useful ideas. Although in hindsight an environment variable doesn't seem like the way to go. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2019 17:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: eggert@cs.ucla.edu, ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156718710110043 (code B ref 583); Fri, 30 Aug 2019 17:46:02 +0000 Received: (at 583) by debbugs.gnu.org; 30 Aug 2019 17:45:01 +0000 Received: from localhost ([127.0.0.1]:54797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3kxJ-0002bo-6Q for submit@debbugs.gnu.org; Fri, 30 Aug 2019 13:45:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3kxI-0002bQ-41 for 583@debbugs.gnu.org; Fri, 30 Aug 2019 13:45:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3kx9-0001QO-PW; Fri, 30 Aug 2019 13:44:51 -0400 Received: from [176.228.60.248] (port=4644 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i3kx8-0006gX-As; Fri, 30 Aug 2019 13:44:50 -0400 Date: Fri, 30 Aug 2019 20:44:59 +0300 Message-Id: <83a7bqa6p0.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Glenn Morris on Fri, 30 Aug 2019 12:18:40 -0400) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Glenn Morris > Date: Fri, 30 Aug 2019 12:18:40 -0400 > Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org > > Although in hindsight an environment variable doesn't seem like the way > to go. Actually, I think it does, because otherwise the user-defined value will be noticed too late, after defcustom's that depend on it were already recomputed. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Aug 2019 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156728832611642 (code B ref 583); Sat, 31 Aug 2019 21:53:02 +0000 Received: (at 583) by debbugs.gnu.org; 31 Aug 2019 21:52:06 +0000 Received: from localhost ([127.0.0.1]:56026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4BHx-00031i-QZ for submit@debbugs.gnu.org; Sat, 31 Aug 2019 17:52:06 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4BHv-00031E-JT for 583@debbugs.gnu.org; Sat, 31 Aug 2019 17:52:04 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D95C916008F; Sat, 31 Aug 2019 14:51:57 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id K-g3aYMsFxfs; Sat, 31 Aug 2019 14:51:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9FBD81600A3; Sat, 31 Aug 2019 14:51:56 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pCdeUYwoh2Pl; Sat, 31 Aug 2019 14:51:56 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3416C16008F; Sat, 31 Aug 2019 14:51:56 -0700 (PDT) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <35285a0c-e43f-c74e-06da-52ef8475b0aa@cs.ucla.edu> Date: Sat, 31 Aug 2019 14:51:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------46389C7EF7420550ED25CBD6" Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------46389C7EF7420550ED25CBD6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Glenn Morris wrote: > I guess user-emacs-directory is being set at build time, not run time. Thanks for reporting that. I installed the attached to fix it. I plan to follow up soon on the other issues raised here. --------------46389C7EF7420550ED25CBD6 Content-Type: text/x-patch; name="0001-Calculate-user-emacs-directory-on-startup.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Calculate-user-emacs-directory-on-startup.patch" >From 2befb4f0a1494f699f56215d5f28ba055663d881 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 31 Aug 2019 14:47:04 -0700 Subject: [PATCH] Calculate user-emacs-directory on startup Problem reported by Glenn Morris (Bug#583#56). * lisp/startup.el (startup--xdg-config-default): New constant. (startup--xdg-config-home-emacs): New var. (startup--xdg-or-homedot): New function. (normal-top-level): Use it to set user-emacs-directory early on. (command-line): Also use it to determine the startup init directory. * lisp/subr.el (user-emacs-directory): Just initialize to nil. --- lisp/startup.el | 51 +++++++++++++++++++++++++++++++++++++------------ lisp/subr.el | 14 ++------------ 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index c1e429b8db..a16db242da 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -490,6 +490,27 @@ normal-top-level-add-to-load-path (when tail (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail)))))) +;; The default location for XDG-convention Emacs init files. +(defconst startup--xdg-config-default "~/.config/emacs/") +;; The location for XDG-convention Emacs init files. +(defvar startup--xdg-config-home-emacs) + +;; Return the name of the init file directory for Emacs, assuming +;; XDG-DIR is the XDG location and USER-NAME is the user name. +;; If USER-NAME is nil or "", use the current user. +;; Prefer the XDG location unless it does does not exist and the +;; .emacs.d location does exist. +(defun startup--xdg-or-homedot (xdg-dir user-name) + (if (file-exists-p xdg-dir) + xdg-dir + (let ((emacs-d-dir (concat "~" user-name + (if (eq system-type 'ms-dos) + "/_emacs.d/" + "/.emacs.d/")))) + (if (file-exists-p emacs-d-dir) + emacs-d-dir + xdg-dir)))) + (defun normal-top-level () "Emacs calls this function when it first starts up. It sets `command-line-processed', processes the command-line, @@ -499,6 +520,14 @@ normal-top-level (message internal--top-level-message) (setq command-line-processed t) + (setq startup--xdg-config-home-emacs + (let ((xdg-config-home (getenv-internal "XDG_CONFIG_HOME"))) + (if xdg-config-home + (concat xdg-config-home "/emacs/") + startup--xdg-config-default))) + (setq user-emacs-directory + (startup--xdg-or-homedot startup--xdg-config-home-emacs nil)) + ;; Look in each dir in load-path for a subdirs.el file. If we ;; find one, load it, which will add the appropriate subdirs of ;; that dir into load-path. This needs to be done before setting @@ -1167,19 +1196,17 @@ command-line :error)))) ;; Calculate the name of the Emacs init directory. - ;; This is typically equivalent to ~/.config/emacs if the user is - ;; following the XDG convention, and is ~INIT-FILE-USER/.emacs.d - ;; on other systems. - (setq xdg-dir (concat (or (getenv "XDG_CONFIG_HOME") - (concat "~" init-file-user "/.config")) - "/emacs/")) + ;; This is typically ~INIT-FILE-USER/.config/emacs unless the user + ;; is following the ~INIT-FILE-USER/.emacs.d convention. + (setq xdg-dir startup--xdg-config-home-emacs) (setq startup-init-directory - (if (file-exists-p xdg-dir) - xdg-dir - (let ((emacs-d-dir (concat "~" init-file-user "/.emacs.d/"))) - (if (file-exists-p emacs-d-dir) - emacs-d-dir - xdg-dir)))) + (if (or (zerop (length init-file-user)) + (and (eq xdg-dir user-emacs-directory) + (not (eq xdg-dir startup--xdg-config-default)))) + user-emacs-directory + ;; The name is not obvious, so access more directories to calculate it. + (setq xdg-dir (concat "~" init-file-user "/.config/emacs/")) + (startup--xdg-or-homedot xdg-dir init-file-user))) ;; Load the early init file, if found. (startup--load-user-init-file diff --git a/lisp/subr.el b/lisp/subr.el index 566a3fc758..cf6fb108e9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2938,18 +2938,8 @@ temp-buffer-setup-hook mode.") (defconst user-emacs-directory - (let ((config-dir (concat (or (getenv-internal "XDG_CONFIG_HOME") - "~/.config") - "/emacs/"))) - (if (file-exists-p config-dir) - config-dir - (let ((emacs-d-dir (if (eq system-type 'ms-dos) - ;; MS-DOS cannot have initial dot. - "~/_emacs.d/" - "~/.emacs.d/"))) - (if (file-exists-p emacs-d-dir) - emacs-d-dir - config-dir)))) + ;; The value does not matter since Emacs sets this at startup. + nil "Directory beneath which additional per-user Emacs-specific files are placed. Various programs in Emacs store information in this directory. Note that this should end with a directory separator. -- 2.17.1 --------------46389C7EF7420550ED25CBD6-- From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: [PATCH] Implement XDG Base Directory specification for user-emacs-directory Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2019 01:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15673010932477 (code B ref 583); Sun, 01 Sep 2019 01:25:01 +0000 Received: (at 583) by debbugs.gnu.org; 1 Sep 2019 01:24:53 +0000 Received: from localhost ([127.0.0.1]:56084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Ebt-0000dt-0m for submit@debbugs.gnu.org; Sat, 31 Aug 2019 21:24:53 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Ebq-0000db-E3 for 583@debbugs.gnu.org; Sat, 31 Aug 2019 21:24:51 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 03EF716008F; Sat, 31 Aug 2019 18:24:43 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QSLEpAg-N0vV; Sat, 31 Aug 2019 18:24:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 403721600A3; Sat, 31 Aug 2019 18:24:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nermm5lVucyq; Sat, 31 Aug 2019 18:24:41 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E652E16008F; Sat, 31 Aug 2019 18:24:40 -0700 (PDT) References: <20190525172356.30070.65317@vcs0.savannah.gnu.org> <20190525172357.86D4F207F5@vcs0.savannah.gnu.org> <835zpnv1o4.fsf@gnu.org> <87lfybw8cd.fsf_-_@fencepost.gnu.org> <83d0jmbmcs.fsf@gnu.org> <8336khbeas.fsf@gnu.org> <83woh0cppu.fsf@gnu.org> <83r26gq0lt.fsf@gnu.org> <87blxg6v5c.fsf@fencepost.gnu.org> <837e83nc87.fsf@gnu.org> <49b51848-c390-eff6-b2e1-be75f67ba620@cs.ucla.edu> <83ef2akyf1.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <52bf6d79-04d3-cecf-aa93-c3a077788e53@cs.ucla.edu> Date: Sat, 31 Aug 2019 18:24:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <83ef2akyf1.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------3703EA54DDD8AD1E6994F721" Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------3703EA54DDD8AD1E6994F721 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit [Responding belatedly to a 2019-07-28 review that I missed, as I was looking for reviews in Bug#583 instead of in the emacs-devel archive. Sorry about that.] > the test which describes in detail how Emacs finds the init > file should be in the section by that name; otherwise it makes no > sense to have that section in the first place. The "Init File" > section should just mention the possible places and refer to that > other section for the details. I gave it a shot by installing the first attached patch, which also fixes a few other confusions and/or inaccuracies that I spotted. The documentation also needs to be updated to replace ~/.emacs.d, either with ~/.config/emacs or with something more general, in places where the documentation refers to the value of user-emacs-directory. That should be fairly mechanical, and can wait until we have the details nailed down. >> > (defconst user-emacs-directory > ... > Can this be a defconst? It's been a defconst ever since it was added to Emacs in 2007. However, the manual has always said it's a variable and there are quite a few uses of (setq user-emacs-directory ...) in the wild, so I installed the second attached patch to make it a defvar. I think the other issues in the review were addressed earlier. --------------3703EA54DDD8AD1E6994F721 Content-Type: text/x-patch; name="0001-Improve-documentation-for-recent-XDG-related-changes.patch" Content-Disposition: attachment; filename*0="0001-Improve-documentation-for-recent-XDG-related-changes.pa"; filename*1="tch" Content-Transfer-Encoding: quoted-printable >From 72ab46fefcc8fa2b20204eaa79e1d750e56d8ccf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 31 Aug 2019 18:16:17 -0700 Subject: [PATCH 1/2] Improve documentation for recent XDG-related changes MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Adjust documentation in the light of Eli=E2=80=99s review here: https://lists.gnu.org/r/emacs-devel/2019-07/msg00712.html * doc/emacs/custom.texi (Init File, Find Init): * doc/lispref/files.texi (Standard File Names): * doc/lispref/os.texi (Init File): --- doc/emacs/custom.texi | 56 +++++++++++++++++++++++++----------------- doc/lispref/files.texi | 7 +++--- doc/lispref/os.texi | 7 ++++-- 3 files changed, 43 insertions(+), 27 deletions(-) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index d3d7d97120..0c2509e1cd 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2228,25 +2228,10 @@ Init File When Emacs is started, it normally tries to load a Lisp program from an @dfn{initialization file}, or @dfn{init file} for short. This file, if it exists, specifies how to initialize Emacs for you. -If the directory @file{@var{xdghome}/.config/emacs} exists, Emacs uses -@file{@var{xdghome}/.config/emacs/init.el} as the init file. Here, -@var{xdghome} stands for the value of the environment variable -@env{XDG_CONFIG_HOME}, or for @file{~/.config} if -@env{XDG_CONFIG_HOME} is unset; @file{~/} stands for your home -directory. - - If @file{~/.config/emacs} does not exist, Emacs looks for your init -file using the filenames @file{~/.emacs}, @file{~/.emacs.el}, or -@file{~/.emacs.d/init.el}; you can choose to use any one of these -names (@pxref{Find Init}). Although this is backward-compatible -with older Emacs versions, modern POSIX platforms prefer putting your -initialization files under @file{.config} so that if you have -to troubleshoot a problem that might be due to a bad init file, or -archive a collection of them, it can be done by renaming or -copying that directory. Note that the @file{.config} versions -don't have a leading dot on the basename part of the file. -For convenience the rest of this section assumes @env{XDG_CONFIG_HOME} -is unset or has a value equivalent to @file{~/.config}. +If the file @file{~/.config/emacs/init.el} exists, it is used as the +init file; otherwise Emacs may look at @file{~/.emacs.el}, +@file{~/.emacs}, @file{~/.emacs.d/init.el}, or other locations. +@xref{Find Init}. =20 You can use the command line switch @samp{-q} to prevent loading your init file, and @samp{-u} (or @samp{--user}) to specify a @@ -2652,8 +2637,31 @@ Find Init @subsection How Emacs Finds Your Init File =20 Emacs normally finds your init file in a location under your home -directory, e.g., @file{~/.config/emacs/init.el} or -@file{~/.emacs.d/init.el}. @xref{Init File}. +directory. @xref{Init File}. By default this location is +@file{~/.config/emacs/init.el} where @file{~/} stands for your home dire= ctory. +This default can be overridden as described below. + + If @env{XDG_CONFIG_HOME} is set in your environment, its +value replaces @file{~/.config} in the name of the default +init file. + + If the default init file's parent directory does not exist but the +directory @file{~/.emacs.d} does exist, Emacs looks for your init file +using the filenames @file{~/.emacs.el}, @file{~/.emacs}, or +@file{~/.emacs.d/init.el}; you can choose to use any one of these +names. (Note that only the locations directly in your home directory +have a leading dot in the location's basename.) Although this is +backward-compatible with older Emacs versions, modern POSIX platforms +prefer putting your initialization files under @file{~/.config} so +that troubleshooting a problem that might be due to a bad init file, +or archiving a collection of init files, can be done by renaming that +directory. To help older Emacs versions find configuration files in +their current default locations, you can execute the following +Emacs Lisp code: + +@example +(make-symbolic-link ".config/emacs" "~/.emacs.d") +@end example =20 However, if you run Emacs from a shell started by @code{su} and @env{XDG_CONFIG_HOME} is not set in your environment, Emacs @@ -2663,10 +2671,14 @@ Find Init =20 More precisely, Emacs first determines which user's init file to use. It gets your user name from the environment variables @env{LOGNAME} and -@env{USER}; if neither of those exists, it uses effective user-ID@. +@env{USER}; if neither of those exists, it uses the effective user-ID@. If that user name matches the real user-ID, then Emacs uses @env{HOME}; otherwise, it looks up the home directory corresponding to that user name in the system's data base of users. + + For brevity the rest of the Emacs documentation generally uses just +the current default location @file{~/.config/emacs/init.el} for the +init file. @c LocalWords: backtab =20 @node Init Non-ASCII diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index d53fed4ee8..c3b6c39b28 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -2822,9 +2822,10 @@ Standard File Names name for a particular use---typically, to hold configuration data specified by the current user. Usually, such files should be located in the directory specified by @code{user-emacs-directory}, which is -@file{~/.config/emacs} or @file{~/.emacs.d} by default (@pxref{Init -File}). For example, abbrev definitions are stored by default in -@file{~/.config/emacs/abbrev_defs} or @file{~/.emacs.d/abbrev_defs}. +typically @file{~/.config/emacs} by default (@pxref{Find +Init,,How Emacs Finds Your Init File, emacs, The GNU Emacs Manual}). +For example, abbrev definitions are stored by default in +@file{~/.config/emacs/abbrev_defs}. The easiest way to specify such a file name is to use the function @code{locate-user-emacs-file}. =20 diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index df21256908..c94e96bde8 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -474,10 +474,13 @@ Init File =20 @defvar user-emacs-directory This variable holds the name of the Emacs default directory. -It is @file{@var{xdghome}/emacs/} if that directory exists, otherwise -@file{~/.emacs.d/} on all platforms but MS-DOS. Here, @var{xdghome} +It defaults to @file{$@{XDG_CONFIG_HOME-'~/.config'@}/emacs/} +if that directory exists and @file{~/.emacs.d/} does not exist, +otherwise to @file{~/.emacs.d/} on all platforms but MS-DOS@. +Here, @file{$@{XDG_CONFIG_HOME-'~/.config'@}} stands for the value of the environment variable @env{XDG_CONFIG_HOME} if that variable is set, and for @file{~/.config} otherwise. +@xref{Find Init,,How Emacs Finds Your Init File, emacs, The GNU Emacs Ma= nual}. @end defvar =20 @node Terminal-Specific --=20 2.17.1 --------------3703EA54DDD8AD1E6994F721 Content-Type: text/x-patch; name="0002-Make-user-emacs-directory-a-variable.patch" Content-Disposition: attachment; filename="0002-Make-user-emacs-directory-a-variable.patch" Content-Transfer-Encoding: quoted-printable >From fd8346600c3872fa1dfdd1ce6522799ba40d0dc0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 31 Aug 2019 18:17:20 -0700 Subject: [PATCH 2/2] Make user-emacs-directory a variable MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit This is in response to Eli=E2=80=99s review here: https://lists.gnu.org/r/emacs-devel/2019-07/msg00712.html * lisp/subr.el (user-emacs-directory): defvar, not defconst --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index cf6fb108e9..0d7bffb35f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2937,7 +2937,7 @@ temp-buffer-setup-hook This hook is normally set up with a function to put the buffer in Help mode.") =20 -(defconst user-emacs-directory +(defvar user-emacs-directory ;; The value does not matter since Emacs sets this at startup. nil "Directory beneath which additional per-user Emacs-specific files are = placed. --=20 2.17.1 --------------3703EA54DDD8AD1E6994F721-- From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2019 02:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156730332915151 (code B ref 583); Sun, 01 Sep 2019 02:03:02 +0000 Received: (at 583) by debbugs.gnu.org; 1 Sep 2019 02:02:09 +0000 Received: from localhost ([127.0.0.1]:56112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4FBx-0003wJ-H2 for submit@debbugs.gnu.org; Sat, 31 Aug 2019 22:02:09 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4FBw-0003w8-Dg for 583@debbugs.gnu.org; Sat, 31 Aug 2019 22:02:08 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 007FF1600A3; Sat, 31 Aug 2019 19:02:02 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id AfoHGFTbneY3; Sat, 31 Aug 2019 19:02:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1ABEA1600AE; Sat, 31 Aug 2019 19:02:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id x8eSTTXlr6Q5; Sat, 31 Aug 2019 19:02:02 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E46671600A3; Sat, 31 Aug 2019 19:02:01 -0700 (PDT) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <60afe0b9-f637-c3ec-34bc-9cfa2b544947@cs.ucla.edu> Date: Sat, 31 Aug 2019 19:02:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Glenn Morris wrote: > IMO this means one should allow a user-defined user-emacs-directory, > which means un-wontfix'ing https://debbugs.gnu.org/15539 . Thanks for mentioning that. I followed up in that bug report, here: https://bugs.gnu.org/15539#109 By the way, making user-emacs-directory a variable instead of a constant has its downsides, because if a user changes user-emacs-directory, then a lot of other variables will keep their old values derived from the previous value of user-emacs-directory, leading to a confusing mish-mosh of old and new behavior. Changing user-emacs-directory works coherently only if it's done very early in startup (which is all that Bug#15539 was asking for). From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2019 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: rgm@gnu.org, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156734871130622 (code B ref 583); Sun, 01 Sep 2019 14:39:02 +0000 Received: (at 583) by debbugs.gnu.org; 1 Sep 2019 14:38:31 +0000 Received: from localhost ([127.0.0.1]:57036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Qzt-0007xp-Qa for submit@debbugs.gnu.org; Sun, 01 Sep 2019 10:38:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Qzr-0007xZ-Iw for 583@debbugs.gnu.org; Sun, 01 Sep 2019 10:38:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i4Qzl-0004Jx-Et; Sun, 01 Sep 2019 10:38:21 -0400 Received: from [176.228.60.248] (port=4123 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i4Qzk-0001Vl-BY; Sun, 01 Sep 2019 10:38:20 -0400 Date: Sun, 01 Sep 2019 17:38:08 +0300 Message-Id: <83ftlg84kv.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <60afe0b9-f637-c3ec-34bc-9cfa2b544947@cs.ucla.edu> (message from Paul Eggert on Sat, 31 Aug 2019 19:02:01 -0700) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> <60afe0b9-f637-c3ec-34bc-9cfa2b544947@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Paul Eggert > Date: Sat, 31 Aug 2019 19:02:01 -0700 > Cc: 583@debbugs.gnu.org > > Changing user-emacs-directory works coherently only if it's done very early in > startup (which is all that Bug#15539 was asking for). We should document what that "very early" means in practice. Does it mean in the early-init file? or can this be done reliably in the normal init file as well? The problem here is that some defcustom's refer to user-emacs-directory, and so changing the value of user-emacs-directory after those defcustoms were computed during startup will leave those defcustoms pointing at the old place. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2019 18:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15673632346628 (code B ref 583); Sun, 01 Sep 2019 18:41:01 +0000 Received: (at 583) by debbugs.gnu.org; 1 Sep 2019 18:40:34 +0000 Received: from localhost ([127.0.0.1]:57226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Um9-0001ip-TP for submit@debbugs.gnu.org; Sun, 01 Sep 2019 14:40:34 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Um7-0001iZ-FG for 583@debbugs.gnu.org; Sun, 01 Sep 2019 14:40:32 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A00F61600AE; Sun, 1 Sep 2019 11:40:25 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vmKOXNaNDPik; Sun, 1 Sep 2019 11:40:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E92D31600BF; Sun, 1 Sep 2019 11:40:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wc8wxQjQz-0s; Sun, 1 Sep 2019 11:40:24 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C14BB1600AE; Sun, 1 Sep 2019 11:40:24 -0700 (PDT) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> <60afe0b9-f637-c3ec-34bc-9cfa2b544947@cs.ucla.edu> <83ftlg84kv.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <18032aff-fdaa-256e-3bf5-a9603c9d28e2@cs.ucla.edu> Date: Sun, 1 Sep 2019 11:40:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <83ftlg84kv.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii wrote: > We should document what that "very early" means in practice. Does it > mean in the early-init file? or can this be done reliably in the > normal init file as well? Sorry, I don't know. That's why I didn't document it. > The problem here is that some defcustom's refer to > user-emacs-directory, and so changing the value of > user-emacs-directory after those defcustoms were computed during > startup will leave those defcustoms pointing at the old place. Yes, it's quite a mess. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2019 18:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: rgm@gnu.org, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.15673638307773 (code B ref 583); Sun, 01 Sep 2019 18:51:01 +0000 Received: (at 583) by debbugs.gnu.org; 1 Sep 2019 18:50:30 +0000 Received: from localhost ([127.0.0.1]:57240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Uvl-00021J-Qw for submit@debbugs.gnu.org; Sun, 01 Sep 2019 14:50:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Uvj-000216-JN for 583@debbugs.gnu.org; Sun, 01 Sep 2019 14:50:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i4Uvd-0008Bs-VA; Sun, 01 Sep 2019 14:50:21 -0400 Received: from [176.228.60.248] (port=4193 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i4Uvc-0005pd-QS; Sun, 01 Sep 2019 14:50:21 -0400 Date: Sun, 01 Sep 2019 21:50:09 +0300 Message-Id: <8336hf97ha.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <18032aff-fdaa-256e-3bf5-a9603c9d28e2@cs.ucla.edu> (message from Paul Eggert on Sun, 1 Sep 2019 11:40:21 -0700) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> <60afe0b9-f637-c3ec-34bc-9cfa2b544947@cs.ucla.edu> <83ftlg84kv.fsf@gnu.org> <18032aff-fdaa-256e-3bf5-a9603c9d28e2@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: rgm@gnu.org, 583@debbugs.gnu.org > From: Paul Eggert > Date: Sun, 1 Sep 2019 11:40:21 -0700 > > Eli Zaretskii wrote: > > We should document what that "very early" means in practice. Does it > > mean in the early-init file? or can this be done reliably in the > > normal init file as well? > > Sorry, I don't know. That's why I didn't document it. > > > The problem here is that some defcustom's refer to > > user-emacs-directory, and so changing the value of > > user-emacs-directory after those defcustoms were computed during > > startup will leave those defcustoms pointing at the old place. > > Yes, it's quite a mess. If doing this in early-init works, I'd rather we documented that as the canonical place that saves users from the mess. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2019 23:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: rgm@gnu.org, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156737889910714 (code B ref 583); Sun, 01 Sep 2019 23:02:02 +0000 Received: (at 583) by debbugs.gnu.org; 1 Sep 2019 23:01:39 +0000 Received: from localhost ([127.0.0.1]:57356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Yqo-0002mj-Ll for submit@debbugs.gnu.org; Sun, 01 Sep 2019 19:01:38 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Yqm-0002mP-9S for 583@debbugs.gnu.org; Sun, 01 Sep 2019 19:01:37 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 86F561600BF; Sun, 1 Sep 2019 16:01:30 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xxPXLqD82j6O; Sun, 1 Sep 2019 16:01:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DB8241600C2; Sun, 1 Sep 2019 16:01:29 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Bkao9dx37SjT; Sun, 1 Sep 2019 16:01:29 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B58351600BF; Sun, 1 Sep 2019 16:01:29 -0700 (PDT) References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <499f2cba-39b3-afe1-7039-fb4c3cf73ea0@cs.ucla.edu> <60afe0b9-f637-c3ec-34bc-9cfa2b544947@cs.ucla.edu> <83ftlg84kv.fsf@gnu.org> <18032aff-fdaa-256e-3bf5-a9603c9d28e2@cs.ucla.edu> <8336hf97ha.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <5523714e-a4fc-96bc-eabb-654d4d874ca5@cs.ucla.edu> Date: Sun, 1 Sep 2019 16:01:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <8336hf97ha.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii wrote: >> Yes, it's quite a mess. > If doing this in early-init works, I'd rather we documented that as > the canonical place that saves users from the mess. I doubt whether it even works in early-init. Not that I've tested it; I don't use early-init and would not be a good person to delve deeper into that part of the mess. From unknown Sat Aug 16 11:42:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#583: Use XDG basedir spec for configuration files? Resent-From: Sven Joachim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Sep 2019 09:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Glenn Morris , ferkiwi@gmail.com, 583@debbugs.gnu.org Received: via spool by 583-submit@debbugs.gnu.org id=B583.156819370222337 (code B ref 583); Wed, 11 Sep 2019 09:22:02 +0000 Received: (at 583) by debbugs.gnu.org; 11 Sep 2019 09:21:42 +0000 Received: from localhost ([127.0.0.1]:42022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i7yon-0005oA-HU for submit@debbugs.gnu.org; Wed, 11 Sep 2019 05:21:41 -0400 Received: from mout.gmx.net ([212.227.17.21]:56573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i7yol-0005ny-M4 for 583@debbugs.gnu.org; Wed, 11 Sep 2019 05:21:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1568193677; bh=Y+eafjOrtYeOdQFBlgSFotQuMTSa8w7GT0ZPSs0c0+4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=NX02fA6y5YyQgi3NzVG8QUOm6fr6j0/5gHxuENQZ7tkOHWES7X9e4sfyoTBoGk8Kw 33IlkJ4wZWJhpRDBrOk0iGxShvX/pX7l8WVdGpj4kV2w0K3Hp3nuxcSQdIYSuSrKDC Rplq6fVKMaQKRWxVaO/zd2BfHqdD4V25rDTzUwGU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([79.223.36.122]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LnkiR-1icL1H41yp-00hxhP; Wed, 11 Sep 2019 11:21:17 +0200 Received: by localhost.localdomain (Postfix, from userid 1000) id 503F7800B8; Wed, 11 Sep 2019 11:21:12 +0200 (CEST) From: Sven Joachim References: <09f0b6af-213f-cc04-336b-00850ba0f3bf@cs.ucla.edu> <8ad91615-e621-7a10-72e2-03277676bd3a@cs.ucla.edu> <35285a0c-e43f-c74e-06da-52ef8475b0aa@cs.ucla.edu> Date: Wed, 11 Sep 2019 11:21:12 +0200 In-Reply-To: <35285a0c-e43f-c74e-06da-52ef8475b0aa@cs.ucla.edu> (Paul Eggert's message of "Sat, 31 Aug 2019 14:51:55 -0700") Message-ID: <87impzmbnb.fsf@turtle.gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:g6EsF/em83qFgpaHCtEJJASZ75yobdHpGCcBmzcRxbRIexHa7Yu s/cnL9fy+2ukbQsgC9EEPxyJ10DxHnM3OFVvbcKz538G45fuU1lm2X9DlgYTY7lWiFpRbF3 RLruLWy3aRsfNk8u7JJ8oPbCGAfawgd2I0hLxRYpOK/UOcy7DMHgvH0jO5H+1GkOVIvX+u6 /QZ2tFS0Y++a30/wWlIwQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3Iyjfoc7zGs=:i/YGt/R2vOvgURot7cktJe OK9uemZMaE94ernFGyNx6bAeZVCaoKl1YhOa5MrUD6fMCEreEv2qwIFu0WGbl91Cwdlt7kWWe mwM2Gwxpnmj4pWMhTlYU2X42L1qoGADHSF2rDgXdNUMKUtQgzcb97DGhtlNQxJe0HGWdjAuAC p/Vqdg56GGy5ONUf3CG00w3VXHpnENjd1fwIxxtvx7k6Vwl5uxqwgID2xc5DX1U9nXorq2AXy JILAkjF0IisJu1irXtbZm4Eu9XOWYGXIsygGACQd6MSFw/utUzRfbkZwiDHZxWDizwTe3azLI 3dPLXjSvJyT4TMm3NWDu8GIivySY3SHzIPTo/kA5ITkq1ZUOTi/vRJIs8X4PVOUy+VlkKxlq5 e8JAGahAW0pBZBPgeWCMSNgJ4TFK9LPRFuL+9zRYvam6X8pw+bOFotQ+PfsV5SIbFZWJK0z2n 7QQJySSWmMvpdZtelKD9MBQp0YMWJudwJQUskhoZaqEmGS2sSGx+KRk+1fYd9ub3yzZ19VR5q k0pWVtRUCM5/avu1RQYl3y0TJebqAJkRw4dSJ4+gsD8H0DvT+qq3JA+x2hXJ+RV9am53G/WeB Lnz1qC015Pj7TrH6bL1/vd9g20q0VVmX4Z2yPmVPni4fT4PNGZKh2ukgMQ9H+7Gg2bPtLVIHM K4RPe5U7tsY1JQ2jCtnLNP7CHNmA40RVoflqQDF7H41NPB8mQgas0SPyL9vlC0wISlprUvmYZ uV4DssLMrWokJ8fqVcW1q83mim41SAa6COjhn/OxNvui7u4ZBTgfFqjzzJG6cKtrx8ZUH7MxY EsqIeUmTbZ9q67qV3PW6xgSAYxKCY9B2eAoF52lFAW5YnfIpIouAt35ZGmrHh5UraaoxEeNz4 PXspSLGVP66raKmWKh397L6VCpB+/WU26qzk9uw+h7h7ZpDxdcC5yWIz60AEBvUMnliDIwUi1 9qeZA6b7BTHwd3wRKxZF2fAppPzPZlRH6bdKgHZhwLJ/KI8asomqVpGGmQrQ4pAZRYhEqYenF oWcXVJ+rFMcbCFFyRbCCshHwrKEfKVq0mmyDHWdrFHUUpNRrS/GMAtgJvkEpryXJPWbW0c9F1 9HKWyU0wBS0zxDvvRL5q/qBrvVBYFx+xZ5u4L4s5VKg4gadC4/auMKVGG0vfWGrJ4TKQfakMH edshyDyx5H8wax8Smqt7JslhGGPlvpzMChah6PJ9xG4SQ1MXpTzmgCUsme8dBd0ZvAZKyQqnR y3IwNolpIsscoSQZYPzkbpP6bZlB513sfZlraiMq8AakUrI3EdKdmxWTzWdg= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2019-08-31 14:51 -0700, Paul Eggert wrote: > Glenn Morris wrote: >> I guess user-emacs-directory is being set at build time, not run time. > > Thanks for reporting that. I installed the attached to fix it. I plan > to follow up soon on the other issues raised here. FWIW, this patch broke auto-save-list-file-prefix, at least when user-emacs-directory is "~/.emacs.d/". See bug #37354. ,---- | auto-save-list-file-prefix is a variable defined in =E2=80=98startup.el= =E2=80=99. | Its value is "auto-save-list/.saves-" | Original value was | "~/.emacs.d/auto-save-list/.saves-" `---- Cheers, Sven > From 2befb4f0a1494f699f56215d5f28ba055663d881 Mon Sep 17 00:00:00 2001 > From: Paul Eggert > Date: Sat, 31 Aug 2019 14:47:04 -0700 > Subject: [PATCH] Calculate user-emacs-directory on startup > > Problem reported by Glenn Morris (Bug#583#56). > * lisp/startup.el (startup--xdg-config-default): New constant. > (startup--xdg-config-home-emacs): New var. > (startup--xdg-or-homedot): New function. > (normal-top-level): Use it to set user-emacs-directory early on. > (command-line): Also use it to determine the startup init directory. > * lisp/subr.el (user-emacs-directory): Just initialize to nil. > --- > lisp/startup.el | 51 +++++++++++++++++++++++++++++++++++++------------ > lisp/subr.el | 14 ++------------ > 2 files changed, 41 insertions(+), 24 deletions(-) > > diff --git a/lisp/startup.el b/lisp/startup.el > index c1e429b8db..a16db242da 100644 > --- a/lisp/startup.el > +++ b/lisp/startup.el > @@ -490,6 +490,27 @@ normal-top-level-add-to-load-path > (when tail > (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail))))= )) >=20=20 > +;; The default location for XDG-convention Emacs init files. > +(defconst startup--xdg-config-default "~/.config/emacs/") > +;; The location for XDG-convention Emacs init files. > +(defvar startup--xdg-config-home-emacs) > + > +;; Return the name of the init file directory for Emacs, assuming > +;; XDG-DIR is the XDG location and USER-NAME is the user name. > +;; If USER-NAME is nil or "", use the current user. > +;; Prefer the XDG location unless it does does not exist and the > +;; .emacs.d location does exist. > +(defun startup--xdg-or-homedot (xdg-dir user-name) > + (if (file-exists-p xdg-dir) > + xdg-dir > + (let ((emacs-d-dir (concat "~" user-name > + (if (eq system-type 'ms-dos) > + "/_emacs.d/" > + "/.emacs.d/")))) > + (if (file-exists-p emacs-d-dir) > + emacs-d-dir > + xdg-dir)))) > + > (defun normal-top-level () > "Emacs calls this function when it first starts up. > It sets `command-line-processed', processes the command-line, > @@ -499,6 +520,14 @@ normal-top-level > (message internal--top-level-message) > (setq command-line-processed t) >=20=20 > + (setq startup--xdg-config-home-emacs > + (let ((xdg-config-home (getenv-internal "XDG_CONFIG_HOME"))) > + (if xdg-config-home > + (concat xdg-config-home "/emacs/") > + startup--xdg-config-default))) > + (setq user-emacs-directory > + (startup--xdg-or-homedot startup--xdg-config-home-emacs nil)) > + > ;; Look in each dir in load-path for a subdirs.el file. If we > ;; find one, load it, which will add the appropriate subdirs of > ;; that dir into load-path. This needs to be done before setting > @@ -1167,19 +1196,17 @@ command-line > :error)))) >=20=20 > ;; Calculate the name of the Emacs init directory. > - ;; This is typically equivalent to ~/.config/emacs if the user is > - ;; following the XDG convention, and is ~INIT-FILE-USER/.emacs.d > - ;; on other systems. > - (setq xdg-dir (concat (or (getenv "XDG_CONFIG_HOME") > - (concat "~" init-file-user "/.config")) > - "/emacs/")) > + ;; This is typically ~INIT-FILE-USER/.config/emacs unless the user > + ;; is following the ~INIT-FILE-USER/.emacs.d convention. > + (setq xdg-dir startup--xdg-config-home-emacs) > (setq startup-init-directory > - (if (file-exists-p xdg-dir) > - xdg-dir > - (let ((emacs-d-dir (concat "~" init-file-user "/.emacs.d/"))) > - (if (file-exists-p emacs-d-dir) > - emacs-d-dir > - xdg-dir)))) > + (if (or (zerop (length init-file-user)) > + (and (eq xdg-dir user-emacs-directory) > + (not (eq xdg-dir startup--xdg-config-default)))) > + user-emacs-directory > + ;; The name is not obvious, so access more directories to calculate i= t. > + (setq xdg-dir (concat "~" init-file-user "/.config/emacs/")) > + (startup--xdg-or-homedot xdg-dir init-file-user))) >=20=20 > ;; Load the early init file, if found. > (startup--load-user-init-file > diff --git a/lisp/subr.el b/lisp/subr.el > index 566a3fc758..cf6fb108e9 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -2938,18 +2938,8 @@ temp-buffer-setup-hook > mode.") >=20=20 > (defconst user-emacs-directory > - (let ((config-dir (concat (or (getenv-internal "XDG_CONFIG_HOME") > - "~/.config") > - "/emacs/"))) > - (if (file-exists-p config-dir) > - config-dir > - (let ((emacs-d-dir (if (eq system-type 'ms-dos) > - ;; MS-DOS cannot have initial dot. > - "~/_emacs.d/" > - "~/.emacs.d/"))) > - (if (file-exists-p emacs-d-dir) > - emacs-d-dir > - config-dir)))) > + ;; The value does not matter since Emacs sets this at startup. > + nil > "Directory beneath which additional per-user Emacs-specific files are = placed. > Various programs in Emacs store information in this directory. > Note that this should end with a directory separator. > --=20 > 2.17.1