[Top][All Lists]

[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: Thu, 21 Mar 2013 02:45:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>> .* 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 doesn't work when searching for the regexp .+
.+ matches nothing but should match the same text as .*

>> 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?

I meant that with `dired-hide-details-mode' at least you don't see
invisible text that Isearch matches outside filenames.  You see
only filenames being matched :)

reply via email to

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