unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3001: 23.0.92; doc for regexp construct (?:
@ 2009-04-15  6:41 ` Drew Adams
  2009-04-15 13:32   ` Stefan Monnier
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Drew Adams @ 2009-04-15  6:41 UTC (permalink / raw)
  To: emacs-pretest-bug

Emacs calls regexp groups that use the grouping construct "(?:" "shy
groups".  I don't get the impression that that is a common term for
this construct, outside Emacs.  Googling "shy group" shows only Emacs
hits.  Googling and searching for regexp groups shows that terms such
as "non-capturing group" and "unnumbered group" are more typically
used for "(?:".
 
And the Emacs doc for "(?:" even explains it as an unnumbered group.
It doesn't explain or hint at the meaning of "shy" at all.  This seems
like a poor choice of words.
 
"Shy" might already have become the Emacs "traditional" terminology,
so that it can't easily be replaced (some people will look for it).
But at least some explanation of the use of the word "shy" is in
order, if only for mnemonic purposes.  What were you thinking? ;-)
(Perhaps it is translated from some other language, where it has more
than one meaning?)
 
More importantly, this construct does not appear to be indexed in the
manual.  It should be indexed under "(: in regexp", as well as under
"regexp non-capturing group" and "regexp unnumbered group" - and of
course "regexp shy group", if that term is kept.
 
 
 
In GNU Emacs 23.0.92.1 (i386-mingw-nt5.1.2600)
 of 2009-03-30 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 







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

* bug#3001: 23.0.92; doc for regexp construct (?:
  2009-04-15  6:41 ` bug#3001: 23.0.92; doc for regexp construct (?: Drew Adams
@ 2009-04-15 13:32   ` Stefan Monnier
  2009-04-15 14:45     ` Andreas Schwab
  2009-04-15 14:57   ` Stefan Monnier
  2009-04-15 22:00   ` bug#3001: marked as done (23.0.92; doc for regexp construct (?:) Emacs bug Tracking System
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2009-04-15 13:32 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-pretest-bug, 3001

> Emacs calls regexp groups that use the grouping construct "(?:" "shy
> groups".  I don't get the impression that that is a common term for
> this construct, outside Emacs.

IIRC I did not invent the term, instead I took it from Perl.  But I must
admit that I cannot find that term in "man perlre", so I'm not sure
where precisely I found it.  It's just the name had'd heard used to
describe this feature of Perl.  Maybe XEmacs's use of the term was an
influence as well.

> Googling "shy group" shows only Emacs hits.

Indeed, it does, yet
http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines
has "shy groups" in its chart.  Indeed googling « "shy groups" perl »
should more than 500 hits, whereas « "shy groups" emacs » shows less
than 200.


        Stefan






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

* bug#3001: 23.0.92; doc for regexp construct (?:
  2009-04-15 13:32   ` Stefan Monnier
@ 2009-04-15 14:45     ` Andreas Schwab
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2009-04-15 14:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, 3001

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Indeed googling « "shy groups" perl » should more than 500 hits,

Though if you add `-emacs -xemacs' to the query almost nothing is left.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."






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

* bug#3001: 23.0.92; doc for regexp construct (?:
  2009-04-15  6:41 ` bug#3001: 23.0.92; doc for regexp construct (?: Drew Adams
  2009-04-15 13:32   ` Stefan Monnier
@ 2009-04-15 14:57   ` Stefan Monnier
  2009-04-15 15:41     ` Drew Adams
  2009-04-15 22:00   ` bug#3001: marked as done (23.0.92; doc for regexp construct (?:) Emacs bug Tracking System
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2009-04-15 14:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: 3001

> But at least some explanation of the use of the word "shy" is in
> order, if only for mnemonic purposes.  What were you thinking? ;-)

I really don't know what I was thinking, sorry, nor what "they"
were thinking.  I could guess at an rationalisation; e.g. "yo' mama's
so shy she doesn't even dare to get a number".

> (Perhaps it is translated from some other language, where it has more
> than one meaning?)

My attempt of humor is indeed translated from an unknown language where
it sounds even less funny.
 
> More importantly, this construct does not appear to be indexed in the
> manual.  It should be indexed under "(: in regexp", as well as under
> "regexp non-capturing group" and "regexp unnumbered group" - and of
> course "regexp shy group", if that term is kept.
 
It is indexed under "shy group, in regexp".  I don't know if chars like
"(?:" can be used in a Texinfo index without first sacrificing a few
virgins.  I'm not sure if it's likely that someone will look for
"non-capturing" or "unnumbered" groups (i.e. would someone look for the
syntax to use for that feature, rather than look for the feature
associated to that syntax?).


        Stefan






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

* bug#3001: 23.0.92; doc for regexp construct (?:
  2009-04-15 14:57   ` Stefan Monnier
@ 2009-04-15 15:41     ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2009-04-15 15:41 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: 3001

> > But at least some explanation of the use of the word "shy" is in
> > order, if only for mnemonic purposes.  What were you thinking? ;-)
> 
> I really don't know what I was thinking, sorry, nor what "they"
> were thinking.  I could guess at an rationalisation; e.g. "yo' mama's
> so shy she doesn't even dare to get a number".

I didn't mean anyone in particular by "you". What I meant is that if we use a
term such as this, we should give some hint as to what is meant by the term
itself.

IOW, let users know why it's called "shy". Why? (1) It helps understanding, by
letting them know they are not missing something. (2) It helps memory, for later
lookup. (3) It helps them understand when they read other doc sections that
might refer to the term without explanation.

> > (Perhaps it is translated from some other language, where 
> > it has more than one meaning?)
> 
> My attempt of humor is indeed translated from an unknown 
> language where it sounds even less funny.

Oh, so "shy" was supposed to be funny?
Was it also supposed to mean something?
Anyway, ca ne me dit rien.

> > More importantly, this construct does not appear to be 
> > indexed in the manual.  It should be indexed under "(:
> > in regexp", as well as under "regexp non-capturing group"
> > and "regexp unnumbered group" - and of
> > course "regexp shy group", if that term is kept.
>  
> It is indexed under "shy group, in regexp".

It is? I don't see that in Emacs 23 pretest 2 (the version I reported on). These
are all of the index entries that contain the string "regexp":

$ in regexp
( in regexp
) in regexp
* in regexp
+ in regexp
. in regexp
? in regexp
ad-activate-regexp
ad-deactivate-regexp
ad-disable-regexp
ad-enable-regexp
ad-update-regexp
adaptive-fill-first-line-regexp
adaptive-fill-regexp
auto-coding-regexp-alist
beginning of line in regexp
character alternative (in regexp)
character classes in regexp
completion-regexp-list
defun-prompt-regexp
end of line in regexp
invalid-regexp
non-greedy repetition characters in regexp
read-regexp
regexp
regexp alternative
regexp grouping
regexp searching
regexp-history
regexp-opt
regexp-opt-depth
regexp-quote
regexps used standardly in editing
replace-regexp-in-string
same-window-regexps
search-spaces-regexp
searching for regexp
sort-regexp-fields
special-display-regexps
standard regexps used in editing
[ in regexp
\ in regexp
\' in regexp
\< in regexp
\= in regexp
\> in regexp
\b in regexp
\B in regexp
\s in regexp
\S in regexp
\w in regexp
\W in regexp
\_< in regexp
\_> in regexp
\` in regexp
] in regexp
^ in regexp
| in regexp

I don't see anything shy there. ;-)

> I don't know if chars like "(?:" can be used in a Texinfo index
> without first sacrificing a few virgins.

I don't know which characters are supported, but see the list above, which
contains other non-letter characters.

> I'm not sure if it's likely that someone will look for
> "non-capturing" or "unnumbered" groups

Why not? Someone familiar with regexps in another language, who wanted to know
whether, and the details of how, Emacs handles unnumbered groups, might well
look that up.

> (i.e. would someone look for the syntax to use for that feature,
> rather than look for the feature associated to that syntax?).

1. Yes, of course. If s?he knew the syntax (or guessed it from another language)
to be (?:, but s?he didn't know what the Emacs doc happens to file this info
away under, might well look up the syntax itself, (?:. That's the first thing I
looked for, FWIW.

2. To look up the feature associated with the syntax, you have to know what the
feature is called. That's why unnumbered group etc. should also be in the index.








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

* bug#3001: marked as done (23.0.92; doc for regexp construct (?:)
  2009-04-15  6:41 ` bug#3001: 23.0.92; doc for regexp construct (?: Drew Adams
  2009-04-15 13:32   ` Stefan Monnier
  2009-04-15 14:57   ` Stefan Monnier
@ 2009-04-15 22:00   ` Emacs bug Tracking System
  2 siblings, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2009-04-15 22:00 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]


Your message dated Wed, 15 Apr 2009 17:57:04 -0400
with message-id <87d4bdbmxb.fsf@cyd.mit.edu>
and subject line Re: 23.0.92; doc for regexp construct (?:
has caused the Emacs bug report #3001,
regarding 23.0.92; doc for regexp construct (?:
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3001: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3001
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4047 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: 23.0.92; doc for regexp construct (?:
Date: Tue, 14 Apr 2009 23:41:48 -0700
Message-ID: <006801c9bd95$41e3e180$0200a8c0@us.oracle.com>

Emacs calls regexp groups that use the grouping construct "(?:" "shy
groups".  I don't get the impression that that is a common term for
this construct, outside Emacs.  Googling "shy group" shows only Emacs
hits.  Googling and searching for regexp groups shows that terms such
as "non-capturing group" and "unnumbered group" are more typically
used for "(?:".
 
And the Emacs doc for "(?:" even explains it as an unnumbered group.
It doesn't explain or hint at the meaning of "shy" at all.  This seems
like a poor choice of words.
 
"Shy" might already have become the Emacs "traditional" terminology,
so that it can't easily be replaced (some people will look for it).
But at least some explanation of the use of the word "shy" is in
order, if only for mnemonic purposes.  What were you thinking? ;-)
(Perhaps it is translated from some other language, where it has more
than one meaning?)
 
More importantly, this construct does not appear to be indexed in the
manual.  It should be indexed under "(: in regexp", as well as under
"regexp non-capturing group" and "regexp unnumbered group" - and of
course "regexp shy group", if that term is kept.
 
 
 
In GNU Emacs 23.0.92.1 (i386-mingw-nt5.1.2600)
 of 2009-03-30 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 




[-- Attachment #3: Type: message/rfc822, Size: 1205 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 3001-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.92; doc for regexp construct (?:
Date: Wed, 15 Apr 2009 17:57:04 -0400
Message-ID: <87d4bdbmxb.fsf@cyd.mit.edu>

I've updated the manual to include "shy groups", "non-capturing groups",
and "unnumbered groups" in the index, and to introduce the latter two
terms.


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

end of thread, other threads:[~2009-04-15 22:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87d4bdbmxb.fsf@cyd.mit.edu>
2009-04-15  6:41 ` bug#3001: 23.0.92; doc for regexp construct (?: Drew Adams
2009-04-15 13:32   ` Stefan Monnier
2009-04-15 14:45     ` Andreas Schwab
2009-04-15 14:57   ` Stefan Monnier
2009-04-15 15:41     ` Drew Adams
2009-04-15 22:00   ` bug#3001: marked as done (23.0.92; doc for regexp construct (?:) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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