[Top][All Lists]

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

RE: :file keyword for Customize

From: Drew Adams
Subject: RE: :file keyword for Customize
Date: Thu, 8 May 2008 11:00:40 -0700

> <address@hidden> wrote: 
> JR> Drew Adams wrote:
> >> The granularity for Customize customizations, in terms of 
> >> persistence and loading is currently all or none: everything
> >> is in one file (`custom-file' or `init-file').
> >>
> JR> JDEE at least, saves its own customizations in project 
> JR> files in the local directory. I think Gnus also lets you
> JR> save your Gnus related customizations in .gnus. That is
> JR> why I suggested looking at what those packages do.
> Gnus has two kinds of settings: normal ELisp variables, customized and
> used as usual, and newsrc settings, which go into .newsrc.eld.  There
> are a few others, like the Gnus registry and score files, but 
> generally the two groups above are the major ones.  There's some magic
> with the group/topic parameters that I can explain but it wouldn't
> matter much for what Drew proposed.
> .gnus.el is just ELisp code, nothing special.  Gnus doesn't 
> set anything special for the ELisp variables it defines, so if they
> are customized, they will be saved in the usual places.
> FWIW, I would make custom-file accept an alist of defgroup/defcustom
> symbol name regex, associated with a file name or a function. 

I don't think that's the place to specify such organization, and I don't think a
regexp offers the right kind of flexibility.

> 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.

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

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

reply via email to

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