[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Demoting `custom-file' to a defvar
From: |
bruce.connor.am |
Subject: |
Re: Demoting `custom-file' to a defvar |
Date: |
Sun, 8 Nov 2015 17:15:43 +0000 |
2015-11-08 16:31 GMT+00:00 Drew Adams <address@hidden>:
>> Honestly, this sounds like a bug to me. Perhaps there's some
>> witchcraft involved, but I fail to see how it can be possible to save
>> `custom-file' via the customization interface and have it be properly
>> loaded on the next session.
>>
>> Unless someone would like to correct me on that, I'd like to
>> just demote it to a defvar.
>
> I don't disagree that it is a gotcha, which is why I mentioned
> it. (And I've mentioned it before.) I disagree that it should
> simply be changed to a defvar. (But I don't feel strongly about
> it.)
>
> Please read the doc string of option `custom-file' carefully.
> IMO, users should be able to take advantage of Customize when
> defining the value.
Thanks for the pointer, here's the relevant doc part.
> If you save this option using Custom, Custom will write all currently
> saved customizations, [...] into the file you specify [...]. It will
> not delete any customizations from the old custom file. You should do
> that manually if that is what you want. You also have to put
> something like ‘(load "CUSTOM-FILE") in your init file, where
> CUSTOM-FILE is the actual name of the file.
So it looks like saving it through customize spares the user the
trouble of copying over the 2 sexps to the new file. They still have
to load the new file from their init file, and delete the old sexps.
Sounds like a misfeature, IMO, so I'm still in favor of demoting it
(though not quite as eagerly as before).
> What's missing is up-front mention of this in the manual,
> at the place where we explain the init file (node Init File).
>
> The general recommendation should be to use `custom-file',
> and in nodeInit File' we should present a simple init-file
> example that shows how to do this.
Agreed.