unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46910: 27.1; (elisp) RX doc
@ 2021-03-03 23:15 Drew Adams
  2021-09-25 15:25 ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2021-03-03 23:15 UTC (permalink / raw)
  To: 46910

1. `Rx Constructs' doesn't explain that the "constructs" are used in
arguments to macro `rx'.

E.g.: "some-string" is not an RX expression.
      (rx "some-string") is an RX expression.

Please make this clear.

2. `Rx Constructs': Don't show things like `\sCODE' without saying what
CODE means.  If the column title for the table explaining RX names is
`Syntax character' or `Category character' then that's apparently what
CODE corresponds to for `\sCODE' or `\cCODE'.  But there's no way to
know that unless you're already familiar with `\s' and `\c' syntax.

3. `Rx Constructs', `Zero-width assertions': Call this `Zero-width
matching' or some such.

4. `Rx Functions': RX-EXPR is used as parameter name for what is, I
guess an Rx construct (the language used in `Rx Construct').  Expression
or construct?  Make it clear that RX-EXPR is an RX construct, if that's
what it is.  And consider adding an xref to `Rx Construct'.

5. `Rx Functions': A couple places talk about `'regexp' forms', but
those are specified nowhere, AFAICT.  The same places talk about
'literal' forms, which are specified, but which don't seem to work (?).
(See bug #46909.)


In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
 of 2020-08-12
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Windowing system distributor `Microsoft Corp.', version 10.0.19041
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static''






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

* bug#46910: 27.1; (elisp) RX doc
  2021-03-03 23:15 bug#46910: 27.1; (elisp) RX doc Drew Adams
@ 2021-09-25 15:25 ` Stefan Kangas
  2021-09-26 12:44   ` Mattias Engdegård
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2021-09-25 15:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: Mattias Engdegård, 46910

Drew Adams <drew.adams@oracle.com> writes:

> 1. `Rx Constructs' doesn't explain that the "constructs" are used in
> arguments to macro `rx'.
>
> E.g.: "some-string" is not an RX expression.
>       (rx "some-string") is an RX expression.
>
> Please make this clear.
>
> 2. `Rx Constructs': Don't show things like `\sCODE' without saying what
> CODE means.  If the column title for the table explaining RX names is
> `Syntax character' or `Category character' then that's apparently what
> CODE corresponds to for `\sCODE' or `\cCODE'.  But there's no way to
> know that unless you're already familiar with `\s' and `\c' syntax.
>
> 3. `Rx Constructs', `Zero-width assertions': Call this `Zero-width
> matching' or some such.
>
> 4. `Rx Functions': RX-EXPR is used as parameter name for what is, I
> guess an Rx construct (the language used in `Rx Construct').  Expression
> or construct?  Make it clear that RX-EXPR is an RX construct, if that's
> what it is.  And consider adding an xref to `Rx Construct'.
>
> 5. `Rx Functions': A couple places talk about `'regexp' forms', but
> those are specified nowhere, AFAICT.  The same places talk about
> 'literal' forms, which are specified, but which don't seem to work (?).
> (See bug #46909.)

Mattias, is this perhaps something you could take a look at?  I guess
it's about (info "(elisp) Rx Notation").





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

* bug#46910: 27.1; (elisp) RX doc
  2021-09-25 15:25 ` Stefan Kangas
@ 2021-09-26 12:44   ` Mattias Engdegård
  0 siblings, 0 replies; 3+ messages in thread
From: Mattias Engdegård @ 2021-09-26 12:44 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 46910-done

25 sep. 2021 kl. 17.25 skrev Stefan Kangas <stefan@marxist.se>:
> 
> Drew Adams <drew.adams@oracle.com> writes:
> 
>> 1. `Rx Constructs' doesn't explain that the "constructs" are used in
>> arguments to macro `rx'.

Yes, I've added an explanation.

>> 2. `Rx Constructs': Don't show things like `\sCODE' without saying what
>> CODE means.  If the column title for the table explaining RX names is
>> `Syntax character' or `Category character' then that's apparently what
>> CODE corresponds to for `\sCODE' or `\cCODE'.  But there's no way to
>> know that unless you're already familiar with `\s' and `\c' syntax.

That's a valid point; now elaborated.

If anything I'd like to move the tables of syntax and (especially) category names to a separate page since they are rarely consulted and take up a lot of space. Not sure how to best do that.

>> 3. `Rx Constructs', `Zero-width assertions': Call this `Zero-width
>> matching' or some such.

Thank you, but it's established terminology and immediately explained in the first sentence.

>> 4. `Rx Functions': RX-EXPR is used as parameter name for what is, I
>> guess an Rx construct

That was a clear mistake, now fixed -- thanks.

>> 5. `Rx Functions': A couple places talk about `'regexp' forms', but
>> those are specified nowhere

The `regexp` and `literal` forms are both documented on the previous page.

For good measure, I also added some examples to illustrate the difference between `rx` and `rx-to-string`.






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

end of thread, other threads:[~2021-09-26 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 23:15 bug#46910: 27.1; (elisp) RX doc Drew Adams
2021-09-25 15:25 ` Stefan Kangas
2021-09-26 12:44   ` Mattias Engdegård

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