help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ~/.emacs vs ~/.emacs.d/init.el.


From: Tim Visher
Subject: Re: ~/.emacs vs ~/.emacs.d/init.el.
Date: Sun, 13 Dec 2020 08:56:24 -0500

On Sun, Dec 13, 2020 at 8:51 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:

> On Sun, Dec 13, 2020 at 6:09 PM Yuri Khan <yuri.v.khan@gmail.com> wrote:
> >
> > On Sun, 13 Dec 2020 at 16:00, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> >
> > > As far as the initialization file is concerned, which is more
> > > preferable,~/.emacs or ~/.emacs.d/init.el?
> >
> > If you are choosing between these two, ~/.emacs.d/init.el is
> > preferable. Because then you can put the whole .emacs.d into version
> > control separately from your home directory.
> >
> > However keep in mind that Emacs 27 adds support for XDG-style
> > configuration directory, ~/.config/emacs/, which gives you the same
> > abilities as ~/.emacs.d with an added benefit of less clutter in your
> > home directory.
>
> I've tried the following based on your above notes, but it seems that
> emacs doesn't pick up the initialization file located under
> ~/.config/emacs/ automatically.
>
> $ mv .emacs.d/init.el ~/.config/emacs/


> Any hints for this problem?
>

You may find this section in the manual helpful.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init


My two guesses are:

More likely: You still have one of

However ~/.emacs.d, ~/.emacs, and ~/.emacs.el are always preferred if they
> exist, which means that you must delete or rename them in order to use the
> XDG location.


Less likely: You have XDG_CONFIG_HOME set somewhere in your environment to
something other than ~/.config.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]