From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames Date: Sun, 03 Jul 2022 21:23:19 +0300 Organization: LINKOV.NET Message-ID: <86k08u6oo8.fsf@mail.linkov.net> References: <87li9hk5e5.fsf@web.de> <87wqt1vd0o.fsf@mail.jurta.org> <87d2ut4mji.fsf@web.de> <87620lvavl.fsf@mail.jurta.org> <87zjxxsd6c.fsf@web.de> <87vc8ke4os.fsf@mail.jurta.org> <86zgmutwx9.fsf@mail.linkov.net> <87o83ab67d.fsf@web.de> <86r185520f.fsf@mail.linkov.net> <87czjn39yf.fsf@web.de> <86y2215rbn.fsf@mail.linkov.net> <87ee3tjecw.fsf@web.de> <87pmnap75m.fsf@web.de> <86mtha7y8w.fsf@mail.linkov.net> <877d8935sf.fsf@web.de> <861qygal8h.fsf@mail.linkov.net> <87ilpm2jan.fsf@web.de> <86mtelbua2.fsf@mail.linkov.net> <86mtduuk02.fsf@mail.linkov.net> <87tu7y85i5.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1504"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Stefan Monnier , 14013@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 03 20:28:24 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o84KW-0000H3-6K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Jul 2022 20:28:24 +0200 Original-Received: from localhost ([::1]:52284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o84KV-0006R7-4B for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Jul 2022 14:28:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o84KA-00066J-Bq for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2022 14:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o84KA-0007kD-3L for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2022 14:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o84K9-0001LV-Tw for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2022 14:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jul 2022 18:28: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: patch Original-Received: via spool by 14013-submit@debbugs.gnu.org id=B14013.16568728805166 (code B ref 14013); Sun, 03 Jul 2022 18:28:01 +0000 Original-Received: (at 14013) by debbugs.gnu.org; 3 Jul 2022 18:28:00 +0000 Original-Received: from localhost ([127.0.0.1]:45501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o84K7-0001LE-7v for submit@debbugs.gnu.org; Sun, 03 Jul 2022 14:28:00 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:62579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o84K0-0001Kv-UJ for 14013@debbugs.gnu.org; Sun, 03 Jul 2022 14:27:57 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B66D040005; Sun, 3 Jul 2022 18:27:44 +0000 (UTC) In-Reply-To: <87tu7y85i5.fsf@web.de> (Michael Heerdegen's message of "Sun, 03 Jul 2022 19:34:26 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236018 Archived-At: >> - (looking-at (cond >> - ((functionp isearch-regexp-function) >> - (funcall isearch-regexp-function isearch-string t)) >> - (isearch-regexp-function (word-search-regexp isearch-string t)) >> - (isearch-regexp isearch-string) >> - (t (regexp-quote isearch-string))))) >> + ;; Like `looking-at' but uses search functions: >> + (let ((isearch-forward t)) >> + (isearch-search-string >> + (concat "\\=\\(?:" isearch-string "\\)") nil t))) >> (error nil)) > > These lines seem to break backwards char-fold isearch for me. Test > case: > > Insert "creme" in an empty buffer (yes, all just ascii latin chars), go > to eob, and C-r M-s ' creme ==> fails. > > Works with forward search and non-char-folding backward search. Thanks for testing. So this is a new reason why this hunk should be left out. Another reason is that some search functions are unsuitable to be called instead of looking-at, such as when the search function in the minibuffer starts to visit history items here. I hope that ‘(replace-search (concat "\\=\\(?:"’ in perform-replace has no such problems.