From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: 2QdxY4RzWzUUiLuE@potatochowder.com Newsgroups: gmane.emacs.help Subject: Re: ~/.emacs vs ~/.emacs.d/init.el. Date: Sun, 13 Dec 2020 12:58:54 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3820"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 13 19:59:28 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koWad-0000si-Vk for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 19:59:27 +0100 Original-Received: from localhost ([::1]:57500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koWad-0003WJ-1j for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 13:59:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1koWaF-0003US-51 for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 13:59:03 -0500 Original-Received: from www458.your-server.de ([136.243.165.62]:33106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1koWaC-0006HJ-SO for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 13:59:02 -0500 Original-Received: from sslproxy02.your-server.de ([78.47.166.47]) by www458.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1koWa9-000EwU-QE for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 19:58:57 +0100 Original-Received: from [172.58.59.246] (helo=localhost) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <2QdxY4RzWzUUiLuE@potatochowder.com>) id 1koWa9-0003ag-5w for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 19:58:57 +0100 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: X-Authenticated-Sender: 2QdxY4RzWzUUiLuE@potatochowder.com X-Virus-Scanned: Clear (ClamAV 0.102.4/26016/Sun Dec 13 15:31:03 2020) Received-SPF: pass client-ip=136.243.165.62; envelope-from=2QdxY4RzWzUUiLuE@potatochowder.com; helo=www458.your-server.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126316 Archived-At: On 2020-12-13 at 23:12:39 +0800, Hongyi Zhao wrote: > On Sun, Dec 13, 2020 at 10:53 PM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote: > > Presumably, ~/.config/emacs is an alternative to ~/.emacs.d, so you > > would move all of that user data from ~/.emacs.d to ~/.config/emacs. > > The net result would have been the same if you had renamed > > ~/.emacs.d to ~/.config/emacs instead of separating the init file > > from the other user data. > > The above operation described by you doesn't conform to the XDG base > directory specification given on its official website > . > To be more specific, see the following exceptions from there for more > info: > > Environment variables > > $XDG_DATA_HOME defines the base directory relative to which user > specific data files should be stored. If $XDG_DATA_HOME is either not > set or empty, a default equal to $HOME/.local/share should be used. > > $XDG_CONFIG_HOME defines the base directory relative to which user > specific configuration files should be stored. If $XDG_CONFIG_HOME is > either not set or empty, a default equal to $HOME/.config should be > used. > > So, if we want to let emacs fully comply with this specification, then > the data should be put under $XDG_DATA_HOME while the config files > should be put under $XDG_CONFIG_HOME. So, the conclusion should be > drawn as follows: > > Emacs data, say, user installed packages ------> $HOME/.local/share/emacs > Emacs config files, say, init.el ------> $HOME/.config/emacs That analysis seems sound, but I'm not up on XDG standards or the latest emacs thought processes enough to be sure (and Lisp furhter blurs the line between data and config, not to mention code). Perhaps the emacs maintainer(s) can clarify on this thread, or perhaps you could file a bug report. Eli? Stefan? FWIW, I'm sticking to my very old ~/.emacs.el file and a few explicitly loaded files under ~/.emacs.d.