GNU bug report logs - #22147
Obsolete search-forward-lax-whitespace

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 22147 <at> debbugs.gnu.org
Subject: bug#22147: Obsolete search-forward-lax-whitespace
Date: Tue, 15 Dec 2015 10:15:56 +0000
2015-12-14 23:58 GMT+00:00 Juri Linkov <juri <at> linkov.net>:
>>> (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,
>
> search-default-regexp-mode definitely needs to be renamed to
> search-default-regexp-function ;-)

Like I said on the devel thread, not sure about this. The only reason
I got this wrong on all the above messages is that I wrote every
single one of them from my phone. :-)

>> 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.
>
> Thanks for the suggestion.  Since it works, then maybe better
> generalize it to allow a mode that supports normalization of
> the search string, that also will do symmetric char-folding,
> where e.g. searching for “ä” will match “a”, etc.

I don't know what you mean. IIUC, the current framework already
supports a "normalizing mode", which is what we just did here, isn't
it?




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.