From: Vincent Lefevre <vincent@vinc17.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Robert Pluim <rpluim@gmail.com>, 58992@debbugs.gnu.org
Subject: bug#58992: 28.2; "lax space matching" no longer works
Date: Fri, 4 Nov 2022 16:00:02 +0100 [thread overview]
Message-ID: <20221104150002.GU9807@zira.vinc17.org> (raw)
In-Reply-To: <83zgd64y08.fsf@gnu.org>
On 2022-11-04 16:04:07 +0200, Eli Zaretskii wrote:
> > From: Robert Pluim <rpluim@gmail.com>
> > Cc: Vincent Lefevre <vincent@vinc17.net>, 58992@debbugs.gnu.org
> > Date: Fri, 04 Nov 2022 14:56:36 +0100
> >
> > >>>>> On Fri, 04 Nov 2022 13:45:35 +0200, Eli Zaretskii <eliz@gnu.org> said:
> > >> A character alternative can also specify named character classes
> > >> (*note Char Classes::). This is a POSIX feature. [...]
> > >>
> > >> You must not change its behavior! Making it depend on the major mode
> > >> is even worse.
> >
> > Eli> Too late for such changes, sorry. Emacs interprets [:space:] like
> > Eli> that since at least Emacs 22, if not before.
> >
> > Would it help if it said "This is based on a POSIX feature, but not
> > 100% identical"?
>
> No. But we can remove that sentence, since it doesn't add anything to
> the text. Done.
IMHO, Section "Syntax of Regular Expressions" (for both Emacs and Elisp)
should warn that the meaning of a regular expression may depend on the
major mode.
Moreover, the [[:space:]\n]+ suggestion for search-whitespace-regexp
should be changed to something that does not use [:space:], as there
is no guarantee that the usual whitespace characters (e.g. space and
tab characters) have whitespace syntax. The manual says:
@item Whitespace characters: @samp{@ } or @samp{-}
Characters that separate symbols and words from each other.
Typically, whitespace characters have no other syntactic significance,
and multiple whitespace characters are syntactically equivalent to a
single one. Space, tab, and formfeed are classified as whitespace in
almost all major modes.
But for Python, multiple whitespace characters are not syntactically
equivalent to a single one. So in a Python major mode, the user would
not want to use [:space:] for searching.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
next prev parent reply other threads:[~2022-11-04 15:00 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 16:53 bug#58992: 28.2; "lax space matching" no longer works Vincent Lefevre
2022-11-03 17:04 ` Eli Zaretskii
2022-11-03 17:21 ` Vincent Lefevre
2022-11-03 17:34 ` Vincent Lefevre
2022-11-03 18:05 ` Eli Zaretskii
2022-11-03 17:49 ` Gregory Heytings
2022-11-03 17:56 ` Vincent Lefevre
2022-11-03 18:02 ` Vincent Lefevre
2022-11-03 18:04 ` Gregory Heytings
2022-11-03 18:04 ` Vincent Lefevre
2022-11-03 18:11 ` Gregory Heytings
2022-11-03 18:18 ` Gregory Heytings
2022-11-03 18:28 ` Vincent Lefevre
2022-11-03 18:39 ` Eli Zaretskii
2022-11-03 18:43 ` Gregory Heytings
2022-11-03 18:36 ` Juri Linkov
2022-11-03 18:18 ` Eli Zaretskii
2022-11-03 18:02 ` Gregory Heytings
2022-11-03 18:03 ` Eli Zaretskii
2022-11-03 18:33 ` Vincent Lefevre
2022-11-03 18:42 ` Eli Zaretskii
2022-11-03 18:52 ` Vincent Lefevre
2022-11-03 19:22 ` Eli Zaretskii
2022-11-04 2:29 ` Vincent Lefevre
2022-11-04 3:38 ` Vincent Lefevre
2022-11-04 7:25 ` Eli Zaretskii
2022-11-04 10:46 ` Vincent Lefevre
2022-11-04 11:50 ` Eli Zaretskii
2022-11-04 7:14 ` Eli Zaretskii
2022-11-04 10:41 ` Vincent Lefevre
2022-11-04 10:56 ` Vincent Lefevre
2022-11-04 11:52 ` Eli Zaretskii
2022-11-04 13:04 ` Vincent Lefevre
2022-11-04 13:40 ` Eli Zaretskii
2022-11-04 11:48 ` Eli Zaretskii
2022-11-04 3:30 ` Vincent Lefevre
2022-11-04 7:21 ` Eli Zaretskii
2022-11-04 10:15 ` Vincent Lefevre
2022-11-04 11:38 ` Andreas Schwab
2022-11-04 12:47 ` Vincent Lefevre
2022-11-04 13:25 ` Andreas Schwab
2022-11-04 14:32 ` Vincent Lefevre
2022-11-04 14:35 ` Andreas Schwab
2022-11-04 15:02 ` Vincent Lefevre
2022-11-04 15:24 ` Andreas Schwab
2022-11-04 11:45 ` Eli Zaretskii
2022-11-04 13:56 ` Robert Pluim
2022-11-04 14:04 ` Eli Zaretskii
2022-11-04 15:00 ` Vincent Lefevre [this message]
2022-11-04 15:23 ` Eli Zaretskii
2022-11-05 1:55 ` Vincent Lefevre
2022-11-05 6:47 ` Eli Zaretskii
2022-11-05 11:20 ` Vincent Lefevre
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=20221104150002.GU9807@zira.vinc17.org \
--to=vincent@vinc17.net \
--cc=58992@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rpluim@gmail.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).