Subject: bug#41006: 26.3; regular expressions documentation

From: Stefan Kangas <[email-masked]>
Date: Tue, 5 May 2020 20:20:59 +0200

Richard Stallman <[email-masked]>writes:

> What I see in master is this structure.
> Is this different from what you saw?
> Does this structure eliminate the problem you had?

I'm also looking at master.  Let me be more specific.

> @menu
> * Syntax of Regexps::       Rules for writing regular expressions.
> * Regexp Example::          Illustrates regular expression syntax.
> @ifnottex
> * Rx Notation::             An alternative, structured regexp notation.
> @end ifnottex
> * Regexp Functions::        Functions for operating on regular expressions.
> @end menu

The above is the problem, for me: it does not include "Regexp Search".
This is where I find any function to actually use the regexps I learn
to construct here.

If I go up one node, to (elisp) Searching and Matching, I can see:

* Regular Expressions::   Describing classes of strings.
* Regexp Search::         Searching for a match for a regexp.

So I suggest to move "Regexp Search" so that it is a section under
"Regular Expressions" (instead of parallel to it).  Maybe conceptually
this is not as clean, but it is more pedagogical and user-friendly,
IMHO.

I would also suggest to place "Regexp Search" first, even before
"Syntax of Regexps", but this is just my personal preference and less
important.  It should at least, from my point of view, come before "Rx
Notation".

While we're at it, I also think "Regexp Search" could state, at the
top, how to access match data.  This is a bit hard to find, IME.

Best regards,
Stefan Kangas