GNU bug report logs - #14013
24.3.50; dired-isearch-filenames-regexp is matching text outside filenames

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Wed, 20 Mar 2013 23:42:01 UTC

Severity: normal

Tags: patch

Merged with 29215

Found in versions 24.3.50, 26.0

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 14013 <at> debbugs.gnu.org
Subject: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames
Date: Sun, 03 Jul 2022 21:23:19 +0300
>> -		   (looking-at (cond
>> -				((functionp isearch-regexp-function)
>> -				 (funcall isearch-regexp-function isearch-string t))
>> -				(isearch-regexp-function (word-search-regexp isearch-string t))
>> -				(isearch-regexp isearch-string)
>> -				(t (regexp-quote isearch-string)))))
>> +		   ;; Like `looking-at' but uses search functions:
>> +		   (let ((isearch-forward t))
>> +		     (isearch-search-string
>> +		      (concat "\\=\\(?:" isearch-string "\\)") nil t)))
>>  	       (error nil))
>
> These lines seem to break backwards char-fold isearch for me.  Test
> case:
>
> Insert "creme" in an empty buffer (yes, all just ascii latin chars), go
> to eob, and C-r M-s ' creme ==> fails.
>
> Works with forward search and non-char-folding backward search.

Thanks for testing.  So this is a new reason why this hunk should be left out.
Another reason is that some search functions are unsuitable to be called
instead of looking-at, such as when the search function in the minibuffer
starts to visit history items here.

I hope that ‘(replace-search (concat "\\=\\(?:"’ in perform-replace
has no such problems.




This bug report was last modified 1 year and 352 days ago.

Previous Next


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