From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>, rms@gnu.org
Cc: mattiase@acm.org, 41006@debbugs.gnu.org, rtm443x@googlemail.com
Subject: bug#41006: 26.3; regular expressions documentation
Date: Fri, 8 May 2020 03:10:45 -0700 [thread overview]
Message-ID: <CADwFkmmq9KiE7W1wSwEQvN2K6QEZivwuheqM0RxLT5269Wn41A@mail.gmail.com> (raw)
In-Reply-To: <831rnukjn1.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> writes:
>> Now we have
>>
>> > > * Regular Expressions:: Describing classes of strings.
>> > > * Regexp Search:: Searching for a match for a regexp.
>>
>> We could convert Regexp Search into a subsection under Regular
>> Expressions. I don't see any harm in doing that.
I'm glad to hear that.
> Let's first decide whether we are talking about the Emacs user manual,
> the ELisp reference manual, or both. The current organization of this
> stuff is slightly different in each one. The OP meant the user
> manual, AFAIU.
Yes, I brought up the ELisp manual. Sorry to bring this related issue
into this discussion without clearly marking it as such.
> To answer the specific question you asked: this is all part of a
> chapter called "Searching and Replacement" in the user manual and
> "Searching and Matching" in the ELisp manual. So having there a
> section called "Regular Expressions" which would include a subsection
> about regexp search makes less sense to me than the other way around:
> have a section "Regular Expression Search" which would start with
> syntax of regexps and go on to a subsection that describes the regexp
> search facilities (it should then probably include the "POSIX Regexps"
> section as well).
I see your point here.
In the user manual, perhaps we could re-organize what we have now
(excluding other subsections for the sake of brevity):
* Searching and Replacement
** Regexp Search:: Search for match for a regexp.
** Regexps:: Syntax of regular expressions.
** Regexp Backslash:: Regular expression constructs starting with ‘\’.
** Regexp Example:: A complex regular expression explained.
Into something like:
* Searching and Replacement
** Regular Expression Search Search for match for a regexp.
*** Regexp Syntax:: Syntax of regular expressions.
*** Regexp Backslash:: Regular expression constructs starting with ‘\’.
*** Regexp Example:: A complex regular expression explained.
I think one needs to look at it in the context of the user manual, and
what the Info node `(emacs) Search' looks like to fully understand the
merit of your argument. Every other subheading in that chapter is
called something with "<foo> Search" (besides one, which is called
"Replace").
---
In the ELisp manual, I think it could fine to have a section called
simply "Regular Expressions". Either the user already knows about
regexps, in which case we have no problem, or the user does not know but
will soon find out.
I argue this only because I find the shorter name more elegant. This is
a minor stylistic point, though, and I'm fine with "Regular Expression
Search" there, too.
In any case, it looks like it needs a bit more work. There are actually
bits and pieces about regular expressions spread out in the chapter
`(elisp) Searching and Matching':
* Regular Expressions:: Describing classes of strings.
* Regexp Search:: Searching for a match for a regexp.
* POSIX Regexps:: Searching POSIX-style for the longest match.
* Match Data:: Finding out which part of the text matched,
after a string or regexp search.
* Search and Replace:: Commands that loop, searching and replacing.
* Standard Regexps:: Useful regexps for finding sentences, pages,...
Moving "Regexp Search" into a more general section called "Regular
Expressions" is a step in the right direction. But then comes the
problem with finding match data, which is part of the "Match Data"
section, or using `re-search-forward', which is in the "Search and
Replace" section. I have found all this information to be hard to find
in the past.
Maybe we can take a small first step here. But perhaps this section
needs a bigger rethink?
Best regards,
Stefan Kangas
next prev parent reply other threads:[~2020-05-08 10:10 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 19:06 bug#41006: 26.3; regular expressions documentation jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-03 3:40 ` Richard Stallman
2020-05-03 10:31 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-03 13:07 ` Mattias Engdegård
2020-05-03 14:00 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-03 20:08 ` Drew Adams
2020-05-03 20:31 ` Stefan Kangas
2020-05-04 1:00 ` Drew Adams
2020-05-05 2:56 ` Richard Stallman
2020-05-05 10:05 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-05 16:51 ` Mattias Engdegård
2020-05-05 18:20 ` Stefan Kangas
2020-05-05 18:40 ` Drew Adams
2020-05-05 19:04 ` Stefan Kangas
2020-05-05 19:42 ` Drew Adams
2020-05-05 21:23 ` Stefan Kangas
2020-05-05 21:37 ` Drew Adams
2020-05-07 2:40 ` Richard Stallman
2020-05-09 3:48 ` Richard Stallman
2020-05-07 2:41 ` Richard Stallman
2020-05-07 3:17 ` Drew Adams
2020-05-08 2:51 ` Richard Stallman
2020-05-07 10:31 ` Stefan Kangas
2020-05-07 2:41 ` Richard Stallman
2020-05-07 3:18 ` Drew Adams
2020-05-07 10:32 ` Stefan Kangas
2020-05-08 2:49 ` Richard Stallman
2020-05-08 6:47 ` Eli Zaretskii
2020-05-08 10:10 ` Stefan Kangas [this message]
2020-05-08 10:31 ` Eli Zaretskii
2020-05-08 18:17 ` Stefan Kangas
2020-05-08 18:47 ` Eli Zaretskii
2020-05-08 20:09 ` Stefan Kangas
2020-05-08 10:04 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-09 3:56 ` Richard Stallman
2020-05-08 16:49 ` Drew Adams
2020-05-09 3:53 ` Richard Stallman
2020-05-09 3:54 ` Richard Stallman
2020-05-07 2:41 ` Richard Stallman
2020-05-04 3:10 ` Richard Stallman
2020-05-04 9:13 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-05 2:56 ` Richard Stallman
2020-05-05 10:02 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-05 17:12 ` Mattias Engdegård
2020-05-05 17:40 ` Eli Zaretskii
2020-05-05 17:50 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-05 18:09 ` Stefan Kangas
2020-05-05 18:23 ` Eli Zaretskii
2020-05-07 2:42 ` Richard Stallman
2022-04-29 12:22 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmmq9KiE7W1wSwEQvN2K6QEZivwuheqM0RxLT5269Wn41A@mail.gmail.com \
--to=stefan@marxist.se \
--cc=41006@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mattiase@acm.org \
--cc=rms@gnu.org \
--cc=rtm443x@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).