GNU bug report logs - #58992
28.2; "lax space matching" no longer works

Previous Next

Package: emacs;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Thu, 3 Nov 2022 16:54:02 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #94 received at 58992 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58992 <at> debbugs.gnu.org
Subject: Re: bug#58992: 28.2; "lax space matching" no longer works
Date: Fri, 4 Nov 2022 11:15:13 +0100
On 2022-11-04 09:21:04 +0200, Eli Zaretskii wrote:
> > Date: Fri, 4 Nov 2022 04:30:38 +0100
> > From: Vincent Lefevre <vincent <at> vinc17.net>
> > Cc: 58992 <at> debbugs.gnu.org
> > 
> > The [[:space:]\n]+ in the doc is misleading. Since a newline character
> > is a whitespace, [[:space:]]+ is sufficient.
> 
> That is only true in major modes where the newline has the
> "whitespace" syntax, see the description of [:space:] in the ELisp
> manual.  I guess you tried this in Fundamental mode or somesuch?

Wow! This is really confusing! [:space:] is defined by POSIX, and the
manual even refers to it:

    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.

If the intent is to have a different meaning, a different name should
be chosen, such as [:whitespace:] (though I'm not sure whether some
names are reserved by POSIX).

-- 
Vincent Lefèvre <vincent <at> 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)




This bug report was last modified 2 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.