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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 14013 <at> debbugs.gnu.org
Subject: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames
Date: Thu, 21 Mar 2013 21:59:52 -0400
> -         (pos1 (save-excursion (funcall func string bound noerror)))
> +         (pos1 (save-excursion
> +		 (run-hooks 'isearch-search-fun-pre-hook)
> +		 (funcall func string bound noerror)))

Doesn't sound good.

> +    (add-hook 'isearch-search-fun-pre-hook 'dired-isearch-filenames-pre-hook nil t)))

Why not (add-function :around (local isearch-search-fun-function)
                      #'dired--isearch-filenames)
and then

   (defun dired--isearch-filenames (iiff &rest args)
     (let ((fun (apply iiff args)))
       (lambda (&rest args)
         (unless (get-text-property (point) 'dired-filename)
           (if isearch-forward
   	       (goto-char (or (next-single-property-change
                               (point) 'dired-filename)
                              (point-max)))
             (goto-char (or (previous-single-property-change
                            (point) 'dired-filename)
                        (point-min)))))
         (apply fun args))))


-- Stefan




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.