emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Default custom file was: Re: Propose to add setup-w


From: Drew Adams
Subject: RE: [External] : Re: Default custom file was: Re: Propose to add setup-wizard.el to ELPA
Date: Wed, 5 Jan 2022 19:10:41 +0000

> I have this in init.el:
>   (setq custom-file (expand-file-name "custom.el"
>                                       user-emacs-directory))
>   (load custom-file)
> 
> I don't understand what's so bad about the
> third line that warrants loading the custom
> file by default.

Just to be sure, in case you misunderstood
something about what I (at least) proposed:

In what I wrote, `custom-file' would only be
loaded automatically, just after the init file,
_IF it was NOT already loaded_.

Your scenario/code is _exactly_ what I think
should be encouraged.

It's what I do too.  (But I actually load it
twice in my init file, to pick up settings
before, and after, particular libraries get
loaded.)

I don't think we should _require_ explicit
loading of `custom-file' in init file (or in
a file loaded by init file etc.).

I think `custom-file' should get loaded
automatically, once its default value gets
changed to something agreed on, such as
"~/.emacs-custom.el".

But I don't think it's bad to encourage
_loading it explicitly_ from one's init file.

And certainly we should point out that you
_can_ do that, and that gives you control
over just when it gets loaded.

> That method of loading the custom file is
> even documented in the doc string of
> `custom-file', so everyone who changes his
> custom file should know about it.

Absolutely.

> Besides, since the original discussion was
> about a setup wizard, we could arrange for
> that setup wizard to set up the custom file
> for the user if he so desires.

Sure, maybe.  And I think that thread talked
about the possibility of multiple such wizards,
or configuring the wizard?  Such things are
possible, if/when we get to defining wizards.

The devil will be in the details of what is
decided for such wizard design.

> > We wait to see if people like it and then
> > include a message when custom-file was
> > already loaded by the user.
> 
> Sometimes it is important for the user to
> manually control when the custom file is loaded.

Absolutely.  And it's always preferable, IMO,
to load it explicitly.  It's good for users
to see where/when they're loading it.

> Having such a message would lead to an
> unreasonable amount of false positives

I agree that such a message would be bad, not
good.  (I also don't think a message saying
that it was loaded automatically would be good.)

reply via email to

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