From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames Date: Thu, 21 Mar 2013 01:35:45 +0100 Message-ID: <87d2ut4mji.fsf@web.de> References: <87li9hk5e5.fsf@web.de> <87wqt1vd0o.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363826179 8331 80.91.229.3 (21 Mar 2013 00:36:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2013 00:36:19 +0000 (UTC) Cc: 14013@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 21 01:36:44 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UITUp-0001AN-7b for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Mar 2013 01:36:43 +0100 Original-Received: from localhost ([::1]:41447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UITUS-0002x6-1Y for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Mar 2013 20:36:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UITUO-0002we-Dl for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 20:36:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UITUM-0001pb-P6 for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 20:36:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UITUM-0001pH-L7 for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 20:36:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UITW5-0001ht-OZ for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 20:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Mar 2013 00:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14013 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14013-submit@debbugs.gnu.org id=B14013.13638262756550 (code B ref 14013); Thu, 21 Mar 2013 00:38:01 +0000 Original-Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 00:37:55 +0000 Original-Received: from localhost ([127.0.0.1]:38199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UITVv-0001hV-4o for submit@debbugs.gnu.org; Wed, 20 Mar 2013 20:37:55 -0400 Original-Received: from mout.web.de ([212.227.17.11]:49739) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UITVo-0001hG-HI for 14013@debbugs.gnu.org; Wed, 20 Mar 2013 20:37:49 -0400 Original-Received: from drachen.dragon ([82.113.106.205]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MKrU4-1UITTv3mHw-000P3Z; Thu, 21 Mar 2013 01:35:55 +0100 In-Reply-To: <87wqt1vd0o.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 21 Mar 2013 01:59:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V02:K0:aifuUOeYb4lWD5I/mG8om23nTNLNKNfCUsTN5zq8Lh4 n1domNoHzs+Pj+LwzQ4j/yf4QgpRehlahgKuTOAdgxPQ0VjON9 KGD1SGr/UBy7Y/a30a/a5nPlOHfELmeAw/YK9t5qMcEnk7QXFV nHHsoCbJm9VtlDAUnxXmQ1V2ENihUT+xiDrIHDzduoZ86v0dCb CV499fDHWXp4iCrTvkn/svje6H7cw6y3jH2zvzwD84= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72759 Archived-At: Juri Linkov 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.