[Top][All Lists]

[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 07:43:58 +0000

> Let me try to put it another way: as I envisage the whole process
> 1.- On startup:
> a) Get the startup file from [ .emacs, .emacs.d/init.el, 
> .config/emacs/init.el ] or whatever set of files we decide and load it
> b) if custom-file is not nil and wasn't already loaded, load custom-file. If 
> is was already loaded, maybe tell the user (???)
> 2.- When saving the customisations
> if custom-file is not nil, save them there else save them in the startup file 
> whatever it is
> AFAIK, the only new thing is to include 1b) in the emacs code, because 1a) 
> and 2) are already in the code (it's how emacs behaves today, right?)
> So someone not defining custom-file would not see anything changing 
> (long-standing behaviour respected)

No.  That's not what I've suggested, at least.

Not defining `custom-file' _would_ change the
behavior.  Setting `custom-file' to your init
file would keep the current default behavior of
Customize using your init file.  That's in fact
what we have now, implicitly: `custom-file' =
init file.  The aim is to make it different,
by default.

I suggested that, by default, Customize would
write to `custom-file'.  Just like a bookmark
file, that variable would have a default value
(different from the default for your init file).

So doing nothing - not changing the default
value of `custom-file' - would mean that
Customize would write to that default file

IOW, we would treat `custom-file' like we treat
bookmark files, desktop files, etc.  We would
not, by default, have Customize write its config
code to your init file.  (You would still be
_able_ to have Customize write to your init file,
if you like; that just wouldn't happen by default.)

I also suggested that we add a variable that you
can set (including conditionally) if you want to
prevent Emacs from loading `custom-file'.

The use of that variable is independent of the
question of where Customize saves info: it would
save to your `custom-file', whether that's a
separate file from your init file (the default
case) or not (you've set it to your init file).
The variable would exist just to give you a way
to prevent loading `custom-file', if you needed
to do that in some context.

reply via email to

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