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 03:24:11 +0100 Message-ID: <87zjxxsd6c.fsf@web.de> References: <87li9hk5e5.fsf@web.de> <87wqt1vd0o.fsf@mail.jurta.org> <87d2ut4mji.fsf@web.de> <87620lvavl.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363832719 28887 80.91.229.3 (21 Mar 2013 02:25:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2013 02:25: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 03:25:45 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 1UIVCJ-0000yA-Ad for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Mar 2013 03:25:43 +0100 Original-Received: from localhost ([::1]:40751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIVBw-0000YU-00 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Mar 2013 22:25:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIVBr-0000YC-G4 for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 22:25:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIVBq-000280-7W for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 22:25:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIVBq-00027w-47 for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 22:25:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UIVDZ-0004EO-NF for bug-gnu-emacs@gnu.org; Wed, 20 Mar 2013 22:27: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 02:27: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.136383277416209 (code B ref 14013); Thu, 21 Mar 2013 02:27:01 +0000 Original-Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 02:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:38247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIVCo-0004DN-6O for submit@debbugs.gnu.org; Wed, 20 Mar 2013 22:26:14 -0400 Original-Received: from mout.web.de ([212.227.17.11]:59297) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIVCk-0004DF-KZ for 14013@debbugs.gnu.org; Wed, 20 Mar 2013 22:26:11 -0400 Original-Received: from drachen.dragon ([82.113.106.205]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0Lsy7e-1UgArs1GFG-012lel; Thu, 21 Mar 2013 03:24:20 +0100 In-Reply-To: <87620lvavl.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 21 Mar 2013 02:45:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V02:K0:NPAwmSf4yshE6EWrAfc3pIsoXSnxio6vVNno9VD/lrg 8/bh4d+R5PNZbOwCUgdDi/HTyProwCpI+HLaBd2BLX+8Ox8700 aMYS68GqfefrPaZHjjbVgMYXHV6sRNY5gbbi/lzdhgTJbCdtqL 5FMduoW0pGt0J0IgFL5NfZRO+RW2mTHYAJLuJELioz7NDQCAtW YVCWxv24zO9x4Ypm9CUWQ4fIeQDyCEuncSoDqovV78= 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:72761 Archived-At: Juri Linkov writes: > >> .* 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 .* Right, thanks. Now I'm beginning to understand how this code works. But the current situation is IMHO a bit unsatisfying - don't you think that being able to use the "wildcard" ".*" is a common, when not the most important reason why a user would want to use regexp filename searching in dired? Would it be an appropriate approach to use a more sophisticated value for `isearch-search-fun-function' for that case? This function could e.g. jump to the next filename before starting searching. Regards, Michael.