emacs-devel
[Top][All Lists]
Advanced

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

Re: :file keyword for Customize


From: Ted Zlatanov
Subject: Re: :file keyword for Customize
Date: Thu, 08 May 2008 14:12:28 -0500
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

On Thu, 8 May 2008 11:00:40 -0700 "Drew Adams" <address@hidden> wrote: 

>Ted Z wrote:
>> FWIW, I would make custom-file accept an alist of defgroup/defcustom
>> symbol name regex, associated with a file name or a function. 

DA> I don't think that's the place to specify such organization, 

We disagree then.

DA> and I don't think a regexp offers the right kind of flexibility.

That may be, the selection mechanism is not important.  It can be a cond
form.  The point is to put the choice in the user's hands.

>> That puts the power in the user's hands, yet allows package authors
>> to add to the alist.  The big win is that no special :file keyword is
>> needed, and all existing packages will work with or without this
>> special settings.

DA> I don't see any such big win. It's no big deal to add a :file
DA> keyword. And all existing packages would continue to work with no
DA> changes - :file would be optional, of course.

All existing packages can work with the new mechanism I proposed without
modifications, whereas your proposal requires special *new* code
everywhere a different custom file is desired, and leaves the choice up
to whoever writes the source code.  Thus the win is that less code is
written all around, users have more choice, and everything works as it
did before.

DA> This is about letting an individual option or face (or perhaps
DA> group) decide where it is stored (and consequently let users decide
DA> when it is loaded). The place to do that is in `defcustom' and
DA> `defface' (and perhaps `defgroup').

I think I understand your proposal, and I think it puts the option in
the place where it's hardest to change it if the package author or the
user should need to do it.  It also makes it hard to organize
configurations in a way that the *user* likes.  Perhaps I misunderstand
your proposal.  Will the user be able to change the :file parameter on
their own without modifying code, for example?

What happens if the file name changes with a new package?  Do you add
extra code to handle the possible values of :file?

What if the user wants to save the configuration for two packages in one
custom file, but all other packages in the default place?  This really
is not an unusual need.  I like to keep my Gnus and BBDB variables
separate from the rest of Emacs but in one file, for example.

The default path the package author picks may not be appropriate.  For
example, in Gnus a lot of work had to be done to remove dependencies on
~/News and ~/Mail that were put in place over time.  Many users needed
those paths relocated to somewhere that made sense to them.

Ted





reply via email to

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