bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outs


From: Juri Linkov
Subject: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames
Date: Tue, 14 Jun 2022 19:31:42 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> I generalized dired-isearch-search-filenames to a new function
> that can search in any text property, so e.g. after evaluating
>
>   (setq-local isearch-search-fun-function
>   (lambda () (isearch-search-fun-in-text-property 'face)))
>
> isearch will match .* in all fontified chunks, etc.

I'm sure later someone might want to add more args such as e.g.
text-property-search-forward has PROPERTY &optional VALUE PREDICATE ...
So better to change the signature in anticipation of adding more
args after PROPERTY:

  diff --git a/lisp/isearch.el b/lisp/isearch.el
  -(defun isearch-search-fun-in-text-property (property &optional search-fun)
  +(defun isearch-search-fun-in-text-property (search-fun property)

  diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
  @@ -3208,7 +3208,7 @@ dired-isearch-search-filenames
  -  (isearch-search-fun-in-text-property 'dired-filename (funcall orig-fun)))
  +  (isearch-search-fun-in-text-property (funcall orig-fun) 'dired-filename))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]