GNU bug report logs -
#54230
29.0.50; Unhelpful regexp hint in search-whitespace-regexp
Previous Next
Reported by: Rudolf Adamkovič <salutis <at> me.com>
Date: Thu, 3 Mar 2022 09:40:01 UTC
Severity: normal
Tags: moreinfo, notabug
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mär 03 2022, Rudolf Adamkovič via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
> In the documentation for the 'search-whitespace-regex':
>
> Actual:
>
>> You might want to use something like "[ \\t\\r\\n]+" instead.
>
> Expected:
>
>> You might want to use something like "[ \t\r\n]+" instead.
You need to look at the actual doc string, not its source:
If non-nil, regular expression to match a sequence of whitespace chars.
When you enter a space or spaces in the incremental search, it
will match any sequence matched by this regexp. As an exception,
spaces are treated normally in regexp incremental search if they
occur in a regexp construct like [...] or *, + or ?.
If the value is a string, it applies to both ordinary and
regexp incremental search. If the value is nil, or
‘isearch-lax-whitespace’ is nil for ordinary incremental search, or
‘isearch-regexp-lax-whitespace’ is nil for regexp incremental search,
then each space you type matches literally, against one space.
You might want to use something like "[ \t\r\n]+" instead.
In the Customization buffer, that is ‘[’ followed by a space, a
tab, a carriage return (control-M), a newline, and ‘]+’. Don’t
add any capturing groups into this value; that can change the
numbering of existing capture groups in unexpected ways.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
This bug report was last modified 3 years and 143 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.