aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRobert Pluim2020-01-15 12:24:43 +0100
committerRobert Pluim2020-01-16 16:05:45 +0100
commit13995f31a219bfcb24da5887136583cbf2deff4c (patch)
treeb8abcb0057271c7ed2d6d90144c6925beaaea128 /etc
parent91cac24952806c6c4addc3c045854c2c314c2e31 (diff)
downloademacs-13995f31a219bfcb24da5887136583cbf2deff4c.tar.gz
emacs-13995f31a219bfcb24da5887136583cbf2deff4c.zip
Make emacs prefer an existing ~/.emacs.d to an existing XDG location
* doc/emacs/custom.texi (Find Init): Update description of how Emacs finds its init file directory and the interaction with $XDG_CONFIG_HOME (Early Init File): Correct XDG location of early-init.el * etc/NEWS: Update description to make it clear the ~/.emacs.d is preferred, even if the XDG location exists. * lisp/startup.el: Prefer ~/.emacs.d even if the XDG location exists. * lib-src/emacsclient.c (open_config): Prefer home directory the XDG location.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS37
1 files changed, 18 insertions, 19 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c1e00395c84..38fff3f7568 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -161,25 +161,24 @@ Emacs 28.
161* Startup Changes in Emacs 27.1 161* Startup Changes in Emacs 27.1
162 162
163+++ 163+++
164** Emacs now uses the XDG convention for init files. 164** Emacs can now use the XDG convention for init files.
165For example, it looks for init.el in "~/.config/emacs/init.el", and 165The 'XDG_CONFIG_HOME' environment variable (which defaults to
166similarly for other init files. 166"~/.config") specifies the XDG configuration parent directory. Emacs
167 167checks for "init.el" and other configuration files inside the "emacs"
168The 'XDG_CONFIG_HOME' environment variable (which defaults to "~/.config") 168subdirectory of 'XDG_CONFIG_HOME', i.e. "$XDG_CONFIG_HOME/emacs/init.el"
169specifies the parent directory of these and other configuration files, 169
170and will override their traditional locations (the home directory, 170However, Emacs will still initially look for init files in their
171"~/.emacs.d", etc.). 171traditional locations if "~/.emacs.d" or "~/.emacs" exist, even if
172 172"$XDG_CONFIG_HOME/emacs" also exists. This means that you must delete
173Emacs will still look for init files in their traditional locations if 173or rename any existing "~/.emacs.d" and "~/.emacs" to enable use of
174"$XDG_CONFIG_HOME/emacs" does not exist, but "~/.emacs.d" or 174the XDG directory.
175"~/.emacs" does exist, so invoking Emacs with XDG_CONFIG_HOME='/nowhere' 175
176might be useful if your new-location init files are scrambled, or if 176If "~/.emacs.d" does not exist, and Emacs has decided to use it
177you want to force Emacs to ignore files under 'XDG_CONFIG_HOME' for 177(i.e. "$XDG_CONFIG_HOME/emacs" does not exist), Emacs will create it.
178some other reason. 178Emacs will never create "$XDG_CONFIG_HOME/emacs".
179 179
180If neither "$XDG_CONFIG_HOME/emacs" nor "~/.emacs.d" exist, Emacs will 180Whichever directory Emacs decides to use, it will set
181now default to "$XDG_CONFIG_HOME/emacs", and will create that directory 181'user-emacs-directory' to point to it.
182and set 'user-emacs-directory' to point to it.
183 182
184+++ 183+++
185** Emacs can now be configured using an early init file. 184** Emacs can now be configured using an early init file.