--- Begin Message ---
Subject: |
23.0.96; custom-group-members |
Date: |
Fri, 10 Jul 2009 10:53:13 -0700 |
emacs -Q
Dunno if this is just a doc bug or a code bug. `custom-group-members'
seems to give the same result - a list of groups, whether its second
arg GROUPS-ONLY is nil or t. I don't see any difference.
Even if there are some cases where there would be a difference, the
doc string is unclear, because it doesn't say what the alternative
is. What should you expect if GROUPS-ONLY is nil, other than groups?
What else might be included in the list?
FWIW, I was looking for a function that, given a group, would return a
list of all options and faces in that group (directly, not by
inheritance). From the function name and doc string, I thought perhaps
`custom-group-members' would do the job (with a nil arg). Apparently
not. But I don't know what it is _supposed_ to do when GROUPS-ONLY is
nil.
In GNU Emacs 23.0.96.1 (i386-mingw-nt5.1.2600)
of 2009-07-09 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#3811: 23.0.96; custom-group-members |
Date: |
Wed, 15 Jul 2009 14:39:05 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) |
> (let ((direct-members (custom-group-members symbol nil)))
> (dolist (dm direct-members)
> (if (eq (cadr dm) 'custom-group)
> (setq members
> (nconc (custom-group-members (car dm) nil t)
> members))
Beware of infinite-recursion since the groups aren't guaranteed to form
a DAG.
> It would be even better to combine args GROUPS-ONLY and RECURSIVEP, but that
> might mean problems for backward incompatibility. But perhaps something like
> this would be OK?
Don't know. Depends if you want to be able to get "all groups,
recursively" or not.
> We might also consider making this a command. Users could use it to
> print out a list of the options and faces for a group.
> Note that one use of the proposed recursive behavior is for a user to
> create a custom group that represents a collection of personal
> settings (across other custom groups), and then to share those
> settings with others. (See the emacs-devel discussion of "skins" as
> custom groups.)
> A user Jane could, for example, use `custom-add-to-group' with group
> `jane', and then she could publish the `jane' settings for others,
> retrieving them using `custom-group-members'. The only other piece
> missing would then be a way for non-Lisp users to do the equivalent of
> `custom-add-to-group' using only the Customize UI. That is, we would
> provide easy ways to specify that certain options and faces should be
> added to group `jane'.
Isn't that going in the same direction as Custom themes?
In any case, it's way out of the scope of this bug report, which
I hence close.
Stefan
--- End Message ---