GNU bug report logs -
#22147
Obsolete search-forward-lax-whitespace
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Fri, 11 Dec 2015 23:54:02 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #22 received at 22147 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 14 Dec 2015 12:23 am, "Juri Linkov" <juri <at> linkov.net> wrote:
> >
> > True. I think it might also be possible to get what you want by just
> > setting the search-whitespace-regexp variable to "[ \t\r\n]+". That
would
> > have the advantage of not removing char folding (and would reduce
> > everything to one line).
>
> This still doesn't allow ^J in the search string to match a newline.
Right. I always get confused about that variable.
> (maybe simpler
> would be to normalize the search string by turning all whitespace
> into space characters),
Yes, I think this should give you the behaviour you're looking for.
Try setting search-default-regexp-function to #'my-lax-with-char-fold,
where
(defun my-lax-with-char-fold (s &optional l)
(character-fold-to-regexp (replace-regexp-in-string "\t\n\r\s+" " " s)
l))
And then also set search-whitespace-regexp like above.
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 308 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.