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

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

bug#36496: [PATCH] Describe the rx notation in the lisp manual


From: Mattias Engdegård
Subject: bug#36496: [PATCH] Describe the rx notation in the lisp manual
Date: Sat, 6 Jul 2019 20:56:57 +0200

6 juli 2019 kl. 13.41 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> I believe you need the same conditional addition in elisp.texi, in the
> detailed menu there.

Thank you, forgot that one. Added.

>> * lisp/emacs-lisp/rx.el (rx): Replace long description with a condensed
>> summary of the rx syntax, with reference to the manual section.
> 
> This is OK, but it is inconsistent wrt whether each construct's
> description ends in a period.  I suggest to end them all with a
> period.

Added, except at the end of the lists of aliases which looked better with a 
minimum of punctuation (and weren't sentences to begin with).

6 juli 2019 kl. 13.59 skrev Noam Postavsky <npostavs@gmail.com>:
> 
> *, +, and ? are not exact aliases of the above: they're always greedy
> (as opposed to depending on rx-greedy-flag).  I think it's a bit
> confusing to rely on the description of minimal-match and maximal-match
> to explain that.

Ah, you called out my little white lie. They are synonyms in practice, because 
almost nobody uses minimal-match, probably for good reasons. (xr used to 
generate {minimal|maximal}-match, but it was decidedly less readable so it got 
changed.)

Yet you are right in the sense that the documentation should not lie or 
wilfully obscure the workings. There appears to be no good solution, because 
the underlying design isn't very good. It might be different if minimal-match 
affected the entire expression inside, including (or ...) and (** ...), but 
that will have to wait for the next big engine.

The new patch versions describe the semantics more objectively, while still 
recommending the user to stay clear of minimal-match. Good enough?

Attachment: 0001-Describe-the-rx-notation-in-the-elisp-manual-bug-364.patch
Description: Binary data

Attachment: 0002-Shorter-rx-doc-string-bug-36496.patch
Description: Binary data


reply via email to

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