bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#3001: 23.0.92; doc for regexp construct (?:


From: Drew Adams
Subject: bug#3001: 23.0.92; doc for regexp construct (?:
Date: Wed, 15 Apr 2009 08:41:00 -0700

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








reply via email to

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