GNU bug report logs - #13568
24.3.50; wishlist: add a `group-p' predicate

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 27 Jan 2013 18:26:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13568 in the body.
You can then email your comments to 13568 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13568; Package emacs. (Sun, 27 Jan 2013 18:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 27 Jan 2013 18:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.3.50; wishlist: add a `group-p' predicate
Date: Sun, 27 Jan 2013 10:24:56 -0800
Subject line says it all: Please add a predicate `group-p' that
returns non-nil if its symbol arg is a loaded customize group
(i.e. defined by a defgroup that has been evaluated).
 
Not sure what the code might be for an appropriate definition.
 
I thought that perhaps (rassq SYMBOL custom-current-group-alist) could
be used as the test, but apparently not.  When there is more than one
defgroup in a file, only the last group gets recorded for it in
`custom-current-group-alist'.  (Is that a bug or intended?)
 
Perhaps one of the following tests, pulled from `customize-read-group',
would be appropriate?  I'm not sure what the second one is about.
`group-p' should return non-nil only for a symbol defined in a defgroup
that has been evaluated (e.g. loaded).
 
1. (get symbol 'custom-group)
 
2. (or (and (get symbol 'custom-loads)
            (not (get symbol 'custom-autoload)))
       (get symbol 'custom-group))
 
But I see that a defgroup for a group that has not (yet) had any faces
or options (or subgroups) added to it is not reflected in
`custom-group', so I guess that test is not appropriate either.  E.g.,
if a (defgroup foo...) is evaluated but it gets no members, then (get
'foo 'custom-group) returns nil.
 
So I'm not sure what the proper definition might be.  That in itself
(showing my ignorance/confusion) is one argument for having a `group-p'
predicate.
 
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2013-01-25 on ODIEONE
Bzr revision: 111604 eliz <at> gnu.org-20130125143821-1ykj7ia1qjojjjnp
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13568; Package emacs. (Thu, 28 Apr 2016 22:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 13568 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13568 <at> debbugs.gnu.org
Subject: Re: bug#13568: 24.3.50; wishlist: add a `group-p' predicate
Date: Fri, 29 Apr 2016 00:06:58 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> Subject line says it all: Please add a predicate `group-p' that
> returns non-nil if its symbol arg is a loaded customize group
> (i.e. defined by a defgroup that has been evaluated).

What the use case for such a function?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13568; Package emacs. (Fri, 29 Apr 2016 15:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 13568 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 13568 <at> debbugs.gnu.org
Subject: RE: bug#13568: 24.3.50; wishlist: add a `group-p' predicate
Date: Fri, 29 Apr 2016 08:44:22 -0700 (PDT)
> > Subject line says it all: Please add a predicate `group-p' that
> > returns non-nil if its symbol arg is a loaded customize group
> > (i.e. defined by a defgroup that has been evaluated).
> 
> What the use case for such a function?

Uh, to test whether a given symbol corresponds to "a loaded
customize group (i.e. defined by a defgroup that has been
evaluated)."

Clearly (see the rest of the bug report), it is not clear
how Lisp code can test for this.  Property `custom-group'
is not the answer.  Nor, apparently, is a combination of
properties `custom-group' and `custom-autoload'.  How to
test for this condition?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13568; Package emacs. (Fri, 29 Apr 2016 15:47:01 GMT) Full text and rfc822 format available.

Message #14 received at 13568 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 13568 <at> debbugs.gnu.org
Subject: Re: bug#13568: 24.3.50; wishlist: add a `group-p' predicate
Date: Fri, 29 Apr 2016 17:45:58 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

>> > Subject line says it all: Please add a predicate `group-p' that
>> > returns non-nil if its symbol arg is a loaded customize group
>> > (i.e. defined by a defgroup that has been evaluated).
>> 
>> What the use case for such a function?
>
> Uh, to test whether a given symbol corresponds to "a loaded
> customize group (i.e. defined by a defgroup that has been
> evaluated)."

And what's the use case for that?  Why do you want to know whether a
symbol has been used as a customization group?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13568; Package emacs. (Fri, 29 Apr 2016 18:12:02 GMT) Full text and rfc822 format available.

Message #17 received at 13568 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 13568 <at> debbugs.gnu.org
Subject: RE: bug#13568: 24.3.50; wishlist: add a `group-p' predicate
Date: Fri, 29 Apr 2016 11:11:34 -0700 (PDT)
> >> > Subject line says it all: Please add a predicate `group-p' that
> >> > returns non-nil if its symbol arg is a loaded customize group
> >> > (i.e. defined by a defgroup that has been evaluated).
> >>
> >> What the use case for such a function?
> >
> > Uh, to test whether a given symbol corresponds to "a loaded
> > customize group (i.e. defined by a defgroup that has been
> > evaluated)."
> 
> And what's the use case for that?  Why do you want to know whether a
> symbol has been used as a customization group?

Why wouldn't I?  A custom group is a thing.  If you have
code that uses that thing (and that is what the thing
is for) then it is reasonable to be able to test for
that thingness.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13568; Package emacs. (Fri, 29 Apr 2016 18:30:02 GMT) Full text and rfc822 format available.

Message #20 received at 13568 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 13568 <at> debbugs.gnu.org
Subject: Re: bug#13568: 24.3.50; wishlist: add a `group-p' predicate
Date: Fri, 29 Apr 2016 20:29:17 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Why wouldn't I?  A custom group is a thing.  If you have
> code that uses that thing (and that is what the thing
> is for) then it is reasonable to be able to test for
> that thingness.

So you have no use case?  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Apr 2016 18:30:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 13568 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Apr 2016 18:30:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 May 2016 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.