unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How can I discover group name?
@ 2016-09-26 11:45 Oleksandr Gavenko
  2016-09-26 14:42 ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksandr Gavenko @ 2016-09-26 11:45 UTC (permalink / raw)
  To: help-gnu-emacs

Within "M-x customize"  I found "Text" group.

I'd like to add my group to this group. Unfortunately this was failed:

  (defgroup xxx nil
    "xxx-mode customization."
    :group 'text)

Searching around gave working piece:

  (defgroup xxx nil
    "xxx-mode customization."
    :group 'wp)

How can I guess "wp" name from customize buffer content?

Is that from somewhat historical reasons?

-- 
http://defun.work/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How can I discover group name?
  2016-09-26 11:45 How can I discover group name? Oleksandr Gavenko
@ 2016-09-26 14:42 ` Drew Adams
  2016-09-26 18:32   ` Oleksandr Gavenko
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2016-09-26 14:42 UTC (permalink / raw)
  To: Oleksandr Gavenko, help-gnu-emacs

> Within "M-x customize"  I found "Text" group.

I don't see that group, with `emacs -Q'.  Perhaps it comes from
some library that you are using?

What does `M-x customize-group RET TAB' tell you?
That's how to discover group names.

> I'd like to add my group to this group. Unfortunately this was failed:
>   (defgroup xxx nil
>     "xxx-mode customization."
>     :group 'text)
              ^^^^  'Text, not 'text, if "Text" is the group name.

> Searching around gave working piece:
>   (defgroup xxx nil
>     "xxx-mode customization."
>     :group 'wp)
> 
> How can I guess "wp" name from customize buffer content?

What is the relation between this and group "Text"?
What do you see in the Customize buffer?

> Is that from somewhat historical reasons?

Is what from somewhat historical reasons?

The question is unclear.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How can I discover group name?
  2016-09-26 14:42 ` Drew Adams
@ 2016-09-26 18:32   ` Oleksandr Gavenko
  2016-09-26 20:53     ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Oleksandr Gavenko @ 2016-09-26 18:32 UTC (permalink / raw)
  To: help-gnu-emacs

On 2016-09-26, Drew Adams wrote:

>> Within "M-x customize"  I found "Text" group.
>
> I don't see that group, with `emacs -Q'.  Perhaps it comes from
> some library that you are using?
>
> What does `M-x customize-group RET TAB' tell you?
> That's how to discover group names.
>
M-x customize RET

  Emacs group: Customization of the One True Editor.
         State : visible group members are all at standard values.
        See also Manual.

  Editing		    Basic text editing facilities.
  Convenience		    Convenience features for faster editing.
  Files		    Support for editing files.
  **Text**	    Support for editing text files.
  ...

Under "Text" group (if press RET on **Text**):

  Text group: Support for editing text files.
         State : visible group members are all at standard values.

  Show Value Text Mode Hook 
     Hook run after entering Text mode. More

  Subgroups:
  Bib		    Major mode for editing bib files.
  Columns		    Prettify columns.
  Lpr		    Print Emacs buffer on line printer.
  Nroff		    Nroff mode.
  Outlines		    Support for hierarchical outlining.
  Picture		    Editing text-based pictures ("ASCII art").
  ...
  Rst		    Support for reStructuredText documents.
  Table		    Text based table manipulation utilities.
  Tex		    Code related to the TeX formatter.
  Tildify		    Add hard spaces or other text fragments to text buffers.
  View		    Peruse file or buffer without editing.

Within 'M-x customize-group RET TAB' I didn't see either "text" nor "Text".

>> I'd like to add my group to this group. Unfortunately this was failed:
>>   (defgroup xxx nil
>>     "xxx-mode customization."
>>     :group 'text)
>               ^^^^  'Text, not 'text, if "Text" is the group name.
>
>> Searching around gave working piece:
>>   (defgroup xxx nil
>>     "xxx-mode customization."
>>     :group 'wp)
>> 
>> How can I guess "wp" name from customize buffer content?
>
> What is the relation between this and group "Text"?
> What do you see in the Customize buffer?

Screens shown above. After executing:

>>   (defgroup xxx nil
>>     "xxx-mode customization."
>>     :group 'wp)

I see my group under Text group:

  Text group: Support for editing text files.
         State : visible group members are all at standard values.

  Show Value Text Mode Hook 
     Hook run after entering Text mode. More

  Subgroups:
  Bib		    Major mode for editing bib files.
  View		    Peruse file or buffer without editing.
  ...
  Xxx		    xxx-mode customization.

================================================================

My question is why does "Text" group require symbol 'wp' in "(defgroup ...)"
call and how can I guess this symbol during navigation across *Customize*
buffers?

I discover proper name only after:

  $ ack -C 5 '(defgroup'  $EMACS_SRC/lisp

  textmodes/rst.el
  283-

  284-(defgroup rst nil "Support for reStructuredText documents."
  285:  :group 'wp
  286-  :version "23.1"
  287-  :link '(url-link "http://docutils.sourceforge.net/rst.html"))

-- 
http://defun.work/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How can I discover group name?
  2016-09-26 18:32   ` Oleksandr Gavenko
@ 2016-09-26 20:53     ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2016-09-26 20:53 UTC (permalink / raw)
  To: Oleksandr Gavenko, help-gnu-emacs

> >> Within "M-x customize"  I found "Text" group.
> >
> > I don't see that group, with `emacs -Q'.  Perhaps it comes from
> > some library that you are using?
> >
> > What does `M-x customize-group RET TAB' tell you?
> > That's how to discover group names.
>
> M-x customize RET
> 
>   Emacs group: Customization of the One True Editor.
>          State : visible group members are all at standard values.
>         See also Manual.
> 
>   Editing		    Basic text editing facilities.
>   Convenience		    Convenience features for faster editing.
>   Files		    Support for editing files.
>   **Text**	    Support for editing text files.
>   ...

Oops.  Looks to me like a bug (#24549) that `M-x customize-group'
does not recognize custom group `text'.

> Under "Text" group (if press RET on **Text**):
> 
>   Text group: Support for editing text files.
>          State : visible group members are all at standard values.
> 
>   Show Value Text Mode Hook
>      Hook run after entering Text mode. More
> 
>   Subgroups:
>   Bib		    Major mode for editing bib files.
>   Columns		    Prettify columns.
>   Lpr		    Print Emacs buffer on line printer.
>   Nroff		    Nroff mode.
>   Outlines		    Support for hierarchical outlining.
>   Picture		    Editing text-based pictures ("ASCII art").
>   ...
>   Rst		    Support for reStructuredText documents.
>   Table		    Text based table manipulation utilities.
>   Tex		    Code related to the TeX formatter.
>   Tildify		    Add hard spaces or other text fragments to text
> buffers.
>   View		    Peruse file or buffer without editing.
> 
> Within 'M-x customize-group RET TAB' I didn't see either "text" nor
> "Text".

Me neither.  I just filed bug #24549 for this.

> >> I'd like to add my group to this group. Unfortunately this was failed:
> >>   (defgroup xxx nil
> >>     "xxx-mode customization."
> >>     :group 'text)
> >               ^^^^  'Text, not 'text, if "Text" is the group name.
> >
> >> Searching around gave working piece:
> >>   (defgroup xxx nil
> >>     "xxx-mode customization."
> >>     :group 'wp)
> >>
> >> How can I guess "wp" name from customize buffer content?
> >
> > What is the relation between this and group "Text"?
> > What do you see in the Customize buffer?
> 
> Screens shown above. After executing:
> 
> >>   (defgroup xxx nil
> >>     "xxx-mode customization."
> >>     :group 'wp)
> 
> I see my group under Text group:
> 
>   Text group: Support for editing text files.
>          State : visible group members are all at standard values.
> 
>   Show Value Text Mode Hook
>      Hook run after entering Text mode. More
> 
>   Subgroups:
>   Bib		    Major mode for editing bib files.
>   View		    Peruse file or buffer without editing.
>   ...
>   Xxx		    xxx-mode customization.
> 
> ================================================================
> 
> My question is why does "Text" group require symbol 'wp' in "(defgroup
> ...)"
> call and how can I guess this symbol during navigation across *Customize*
> buffers?

Good question.  I'm getting the impression that `text' is not
a real group but is some other kind of (virtual) grouping of
some other groups.

I do not see it defined in the Lisp sources using `defgroup'.
If it were defined using `defgroup', as usual, then I would
expect that (1) you would be able to inherit from it directly
and (2) it would be recognized by `customize-group'.

> I discover proper name only after:
> 
>   $ ack -C 5 '(defgroup'  $EMACS_SRC/lisp
> 
>   textmodes/rst.el
>   283-
> 
>   284-(defgroup rst nil "Support for reStructuredText documents."
>   285:  :group 'wp
>   286-  :version "23.1"
>   287-  :link '(url-link "http://docutils.sourceforge.net/rst.html"))



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-26 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26 11:45 How can I discover group name? Oleksandr Gavenko
2016-09-26 14:42 ` Drew Adams
2016-09-26 18:32   ` Oleksandr Gavenko
2016-09-26 20:53     ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).