GNU bug report logs -
#36496
[PATCH] Describe the rx notation in the lisp manual
Previous Next
Reported by: Mattias EngdegÄrd <mattiase <at> acm.org>
Date: Thu, 4 Jul 2019 12:14:01 UTC
Severity: wishlist
Merged with 31698
Found in version 27.0
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
6 juli 2019 kl. 13.41 skrev Eli Zaretskii <eliz <at> 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 <at> 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?
[0001-Describe-the-rx-notation-in-the-elisp-manual-bug-364.patch (application/octet-stream, attachment)]
[0002-Shorter-rx-doc-string-bug-36496.patch (application/octet-stream, attachment)]
This bug report was last modified 3 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.