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: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Juri Linkov <juri <at> jurta.org>
Cc: 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 01:35:45 +0100
Juri Linkov <juri <at> jurta.org> writes:

> > - M-x dired-isearch-filenames-regexp RET
> >
> > - Enter the character c (i.e. hit r in my example)
> >
> >   Only matches inside file names are found
> >
> > - Now hit .*
> >
> >   Now also matches starting before filenames are found.  This behavior
> >   continues if you enter even more characters.
>
> .* matches a whole line.  We can't hide from Isearch the fact
> that lines in Dired contain more details besides filenames.

What about doing this (unrelated parts stripped, just as an example):

(defun dired-isearch-filter-filenames (beg end)
  (let ((beg (min beg end))
        (end (max beg end)))
   (and (get-text-property beg 'dired-filename)
        (or (eq (char-after end) ?\n)
            (get-text-property end 'dired-filename)))))

This assumes that file names are convex and followed by a newline.

> However, you can hide these details and leave only filenames
> by using `dired-hide-details-mode' or typing `('.  Then .*
> will match only visible filenames.

Surprisingly that doesn't work.  Even with search-invisible nil I get
exactly the same matches, i.e., also the invisible text is being
matched.  What did I miss?


Regards,

Michael.




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.