GNU bug report logs - #14013
24.3.50; dired-isearch-filenames-regexp is matching text outside filenames

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: michael_heerdegen@HIDDEN; Keywords: patch; merged with #29215; Done: Juri Linkov <juri@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 15 Jun 2022 16:36:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 15 12:36:22 2022
Received: from localhost ([127.0.0.1]:39695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o1W0D-0006yH-Pg
	for submit <at> debbugs.gnu.org; Wed, 15 Jun 2022 12:36:22 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:41121)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1o1W0B-0006xz-KZ
 for 14013 <at> debbugs.gnu.org; Wed, 15 Jun 2022 12:36:20 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 8FEC0200005;
 Wed, 15 Jun 2022 16:36:11 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <87ilpm2jan.fsf@HIDDEN> <86mtelbua2.fsf@HIDDEN>
Date: Wed, 15 Jun 2022 19:34:39 +0300
In-Reply-To: <86mtelbua2.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 09 Jun 2022 20:30:45 +0300")
Message-ID: <86a6ad6i2c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

--=-=-=
Content-Type: text/plain

> BTW, do you think that such regexps as ".*" and "^.*$"
> should be supported not only in Dired buffers, but also
> when making replacements in rectangular regions?
> E.g. C-x SPC ... C-M-% .* RET RET should effectively
> clear the region, etc.

After a small refactoring, searching in rectangular regions
is implemented as well:


--=-=-=
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: inline;
 filename=isearch-search-fun-in-noncontiguous-region.patch
Content-Transfer-Encoding: 8bit

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 7650ebcfce..2fd172e75c 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4455,18 +4518,45 @@ minibuffer-lazy-highlight-setup
         (funcall after-change nil nil nil)))))
 
 
+(defun isearch-search-fun-in-noncontiguous-region (search-fun region-bounds)
+  "Return the function that searches inside noncontiguous regions."
+  (apply-partially
+   #'search-within-boundaries
+   search-fun
+   (lambda (pos)
+     (seq-some (lambda (b) (and (>= pos (car b)) (<= pos (cdr b))))
+               region-bounds))
+   (lambda (pos)
+     (let* ((bounds (flatten-list region-bounds))
+            found)
+       (unless isearch-forward
+         (setq bounds (nreverse bounds)))
+       (while (and bounds (not found))
+         (if (if isearch-forward (< pos (car bounds)) (> pos (car bounds)))
+             (setq found (car bounds))
+           (setq bounds (cdr bounds))))
+       found))))
+
 (defun isearch-search-fun-in-text-property (search-fun property)
   "Return the function to search inside text that has the specified PROPERTY.
 The function will limit the search for matches only inside text which has
 this property in the current buffer.
 The argument SEARCH-FUN provides the function to search text, and
 defaults to the value of `isearch-search-fun-default' when nil."
-  (lambda (string &optional bound noerror count)
+  (apply-partially
+   #'search-within-boundaries
+   search-fun
+   (lambda (pos) (get-text-property pos property))
+   (lambda (pos) (if isearch-forward
+                     (next-single-property-change pos property)
+                   (previous-single-property-change pos property)))))
+
+(defun search-within-boundaries ( search-fun get-fun next-fun
+                                  string &optional bound noerror count)
   (let* ((old (point))
          ;; Check if point is already on the property.
-           (beg (when (get-text-property
-                       (if isearch-forward old (max (1- old) (point-min)))
-                       property)
+         (beg (when (funcall get-fun (if isearch-forward old
+                                       (max (1- old) (point-min))))
                 old))
          end found (i 0)
          (subregexp
@@ -4480,30 +4570,23 @@ isearch-search-fun-in-text-property
                        (throw 'subregexp t))))))))
     ;; Otherwise, try to search for the next property.
     (unless beg
-        (setq beg (if isearch-forward
-                      (next-single-property-change old property)
-                    (previous-single-property-change old property)))
+      (setq beg (funcall next-fun old))
       (when beg (goto-char beg)))
     ;; Non-nil `beg' means there are more properties.
     (while (and beg (not found))
       ;; Search for the end of the current property.
-        (setq end (if isearch-forward
-                      (next-single-property-change beg property)
-                    (previous-single-property-change beg property)))
+      (setq end (funcall next-fun beg))
       ;; Handle ^/$ specially by matching in a temporary buffer.
       (if subregexp
           (let* ((prop-beg
                   (if (or (if isearch-forward (bobp) (eobp))
-                            (null (get-text-property
-                                   (+ (point) (if isearch-forward -1 0))
-                                   property)))
+                          (null (funcall get-fun (+ (point)
+                                                    (if isearch-forward -1 0)))))
                       ;; Already at the beginning of the field.
                       beg
                     ;; Get the real beginning of the field when
                     ;; the search was started in the middle.
-                      (if isearch-forward
-                          (previous-single-property-change beg property)
-                        (next-single-property-change beg property))))
+                    (funcall next-fun beg)))
                  (substring (buffer-substring prop-beg end))
                  (offset (if isearch-forward prop-beg end))
                  match-data)
@@ -4532,12 +4615,10 @@ isearch-search-fun-in-text-property
                      noerror count)))
       ;; Get the next text property.
       (unless found
-          (setq beg (if isearch-forward
-                        (next-single-property-change end property)
-                      (previous-single-property-change end property)))
+        (setq beg (funcall next-fun end))
         (when beg (goto-char beg))))
     (unless found (goto-char old))
-      found)))
+    found))
 
 
 (defun isearch-resume (string regexp word forward message case-fold)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 14 Jun 2022 16:33:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 14 12:33:15 2022
Received: from localhost ([127.0.0.1]:35594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o19Te-0001cY-PT
	for submit <at> debbugs.gnu.org; Tue, 14 Jun 2022 12:33:14 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:35795)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1o19Tc-0001cI-P1
 for 14013 <at> debbugs.gnu.org; Tue, 14 Jun 2022 12:33:13 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id C8692FF806;
 Tue, 14 Jun 2022 16:33:04 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <87ilpm2jan.fsf@HIDDEN> <86czfgbh9i.fsf@HIDDEN>
Date: Tue, 14 Jun 2022 19:31:42 +0300
In-Reply-To: <86czfgbh9i.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 10 Jun 2022 19:44:09 +0300")
Message-ID: <865yl3gqa9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> I generalized dired-isearch-search-filenames to a new function
> that can search in any text property, so e.g. after evaluating
>
>   (setq-local isearch-search-fun-function
>   (lambda () (isearch-search-fun-in-text-property 'face)))
>
> isearch will match .* in all fontified chunks, etc.

I'm sure later someone might want to add more args such as e.g.
text-property-search-forward has PROPERTY &optional VALUE PREDICATE ...
So better to change the signature in anticipation of adding more
args after PROPERTY:

  diff --git a/lisp/isearch.el b/lisp/isearch.el
  -(defun isearch-search-fun-in-text-property (property &optional search-fun)
  +(defun isearch-search-fun-in-text-property (search-fun property)

  diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
  @@ -3208,7 +3208,7 @@ dired-isearch-search-filenames
  -  (isearch-search-fun-in-text-property 'dired-filename (funcall orig-fun)))
  +  (isearch-search-fun-in-text-property (funcall orig-fun) 'dired-filename))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.
bug marked as fixed in version 29.0.50, send any further explanations to 14013 <at> debbugs.gnu.org and michael_heerdegen@HIDDEN Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 12 Jun 2022 16:46:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 12 12:46:44 2022
Received: from localhost ([127.0.0.1]:56416 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o0Qjc-0005Pe-8N
	for submit <at> debbugs.gnu.org; Sun, 12 Jun 2022 12:46:44 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:57209)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1o0Qja-0005PN-Mf; Sun, 12 Jun 2022 12:46:43 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 172761BF206;
 Sun, 12 Jun 2022 16:46:33 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <86pmlyqbfh.fsf@HIDDEN> <87pmjudoqz.fsf@HIDDEN>
 <861qvw773e.fsf@HIDDEN>
Date: Sun, 12 Jun 2022 19:46:04 +0300
In-Reply-To: <861qvw773e.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 10 Jun 2022 20:17:25 +0300")
Message-ID: <86y1y1q183.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

close 14013 29.0.50
thanks

>>> This works surprisingly well.  Maybe there are more corner cases,
>>> but something already works with quick tests:
>>
>> Yes, not bad indeed.  Did you find any corner cases?
>
> Using a temporary buffer like you proposed works fine,
> and handles all possible regexps including corner cases.
> However, wouldn't this make the search too inefficient?

Now the implementation that supports all cases is pushed.
Thanks for all suggestions that helped to achieve this.
Any ideas for more improvements are welcome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 10 Jun 2022 17:40:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 10 13:40:28 2022
Received: from localhost ([127.0.0.1]:51244 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nzicW-0005OU-6W
	for submit <at> debbugs.gnu.org; Fri, 10 Jun 2022 13:40:28 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:43541)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nzicU-0005OG-4s
 for 14013 <at> debbugs.gnu.org; Fri, 10 Jun 2022 13:40:26 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 3ED0B1C0006;
 Fri, 10 Jun 2022 17:40:17 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <86pmlyqbfh.fsf@HIDDEN> <87pmjudoqz.fsf@HIDDEN>
Date: Fri, 10 Jun 2022 20:17:25 +0300
In-Reply-To: <87pmjudoqz.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 31
 May 2022 11:40:04 +0200")
Message-ID: <861qvw773e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

--=-=-=
Content-Type: text/plain

>> This works surprisingly well.  Maybe there are more corner cases,
>> but something already works with quick tests:
>>
>> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
>
> Yes, not bad indeed.  Did you find any corner cases?

Using a temporary buffer like you proposed works fine,
and handles all possible regexps including corner cases.
However, wouldn't this make the search too inefficient?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=isearch-search-fun-in-text-property.patch

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 5fbfb724a3..8470170f24 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4482,12 +4545,25 @@ isearch-search-fun-in-text-property
         (setq end (if isearch-forward
                       (next-single-property-change beg property)
                     (previous-single-property-change beg property)))
-        (setq found (funcall (or search-fun (isearch-search-fun-default))
-                             string (if bound (if isearch-forward
-                                                  (min bound end)
-                                                (max bound end))
-                                      end)
-                             noerror count))
+        (if (and isearch-regexp (string-match-p "\\(\\^\\)\\|\\$" string))
+            (let ((substring (buffer-substring beg end))
+                  match-data)
+              (with-temp-buffer
+                (insert substring)
+                (goto-char (point-min))
+                (setq found (funcall (or search-fun (isearch-search-fun-default))
+                                     string (if bound (- bound beg) (1+ (- end beg)))
+                                     noerror count))
+                (when found
+                  (setq found (+ found beg)
+                        match-data (mapcar (lambda (m) (1- (+ m beg))) (match-data)))))
+              (when match-data (set-match-data match-data)))
+          (setq found (funcall (or search-fun (isearch-search-fun-default))
+                               string (if bound (if isearch-forward
+                                                    (min bound end)
+                                                  (max bound end))
+                                        end)
+                               noerror count)))
         (unless found
           (setq beg (if isearch-forward
                         (next-single-property-change end property)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 10 Jun 2022 16:44:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 10 12:44:55 2022
Received: from localhost ([127.0.0.1]:51129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nzhkl-0003xx-PP
	for submit <at> debbugs.gnu.org; Fri, 10 Jun 2022 12:44:55 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42687)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nzhkj-0003xR-WB
 for 14013 <at> debbugs.gnu.org; Fri, 10 Jun 2022 12:44:54 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 3BBF14000A;
 Fri, 10 Jun 2022 16:44:45 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <87ilpm2jan.fsf@HIDDEN>
Date: Fri, 10 Jun 2022 19:44:09 +0300
In-Reply-To: <87ilpm2jan.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 31
 May 2022 10:33:20 +0200")
Message-ID: <86czfgbh9i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>> So the above rectangle when copied to a separate buffer:
>>
>>       456
>>       def
>>
>> do you expect it should match the regexp "456.def"?
>
> I would not want that this matches.

I generalized dired-isearch-search-filenames to a new function
that can search in any text property, so e.g. after evaluating

  (setq-local isearch-search-fun-function
  (lambda () (isearch-search-fun-in-text-property 'face)))

isearch will match .* in all fontified chunks, etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 9 Jun 2022 17:52:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 09 13:52:07 2022
Received: from localhost ([127.0.0.1]:47692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nzMKF-0007Dq-8E
	for submit <at> debbugs.gnu.org; Thu, 09 Jun 2022 13:52:07 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:51813)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nzMKD-0007DK-2M
 for 14013 <at> debbugs.gnu.org; Thu, 09 Jun 2022 13:52:06 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 69F2E240005;
 Thu,  9 Jun 2022 17:51:56 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <87ilpm2jan.fsf@HIDDEN>
Date: Thu, 09 Jun 2022 20:30:45 +0300
In-Reply-To: <87ilpm2jan.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 31
 May 2022 10:33:20 +0200")
Message-ID: <86mtelbua2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>> So the above rectangle when copied to a separate buffer:
>>
>>       456
>>       def
>>
>> do you expect it should match the regexp "456.def"?
>
> I would not want that this matches.

BTW, do you think that such regexps as ".*" and "^.*$"
should be supported not only in Dired buffers, but also
when making replacements in rectangular regions?
E.g. C-x SPC ... C-M-% .* RET RET should effectively
clear the region, etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 8 Jun 2022 16:29:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 08 12:29:08 2022
Received: from localhost ([127.0.0.1]:44052 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nyyYO-0008PY-GJ
	for submit <at> debbugs.gnu.org; Wed, 08 Jun 2022 12:29:08 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:56703)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nyyYM-0008Ol-Ry
 for 14013 <at> debbugs.gnu.org; Wed, 08 Jun 2022 12:29:07 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 4E5EA24000A;
 Wed,  8 Jun 2022 16:28:58 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <86pmlyqbfh.fsf@HIDDEN> <87pmjudoqz.fsf@HIDDEN>
Date: Wed, 08 Jun 2022 19:28:42 +0300
In-Reply-To: <87pmjudoqz.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 31
 May 2022 11:40:04 +0200")
Message-ID: <86v8tbi0th.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

--=-=-=
Content-Type: text/plain

>> This works surprisingly well.  Maybe there are more corner cases,
>> but something already works with quick tests:
>
> Yes, not bad indeed.  Did you find any corner cases?

Below is the patch that works quite well for the most use cases.
But unfortunately, there are still some unsolvable corner cases:
when a file name is e.g. "aaxbbx" and the search regexp is "x$",
then after removing "$", searching for "x" will find the first
occurrence of "x", and will set match-data to it.  Later code
that uses string-match can adjust the found position to the
last occurrence of "x".  But it can't change match-data
used by isearch.  And using a temporary buffer won't help either
to set the real buffer positions in match-data to the last "x".
IOW, no post-processing can help the main search function
to set match-data to the correct place that matches "x$"
in the dired buffer (and file name doesn't always end at eol).

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=dired-isearch-search-filenames.patch

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 4faf9431aa..bb17760598 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3217,7 +3217,17 @@ dired-isearch-search-filenames
                          (if isearch-forward old (max (1- old) (point-min)))
                          property)
                     old))
-             end found)
+             end found regexp regexp-^ regexp-$ (i 0))
+        (when isearch-regexp
+          (setq regexp string)
+          (while (string-match "\\(\\^\\|\\\\`\\)\\|\\$\\|\\\\'" string i)
+            (setq i (match-beginning 0))
+            (if (save-match-data (not (subregexp-context-p
+                                       string (match-beginning 0))))
+                ;; The ^/$ is inside a char-range or escaped or something.
+                (setq i (1+ i))
+              (setq string (replace-match "" t t string))
+              (if (match-beginning 1) (setq regexp-^ t) (setq regexp-$ t)))))
         ;; Otherwise, try to search for the next property.
         (unless beg
           (setq beg (if isearch-forward
@@ -3236,6 +3246,29 @@ dired-isearch-search-filenames
                                                      (max bound end))
                                            end)
                        noerror count))
+          ;; Handle ^/$ specially
+          (when (and regexp found)
+            ;; Apply ^/$ regexp on the whole filename field
+            (save-match-data
+              (if (string-match regexp (buffer-substring beg end))
+                  ;; FIXME: better to modify previous match-data
+                  (setq found (if isearch-forward
+                                  (+ beg (match-end 0))
+                                (- beg (match-end 0))))
+                (setq found nil)))
+            ;; Check ^/$ matches at filename field boundaries
+            (when found
+              (goto-char found)
+              (unless (and (or (not regexp-^)
+                               (eq (if isearch-forward beg end) (point-min))
+                               (null (get-text-property
+                                      (1- (if isearch-forward beg end)) property)))
+                           (or (not regexp-$)
+                               (eq (point) (point-max))
+                               (null (get-text-property
+                                      (point) property))))
+                (setq found nil))))
+          ;; Get the next filename field
           (unless found
             (setq beg (if isearch-forward
                           (next-single-property-change end property)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 31 May 2022 09:40:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 31 05:40:18 2022
Received: from localhost ([127.0.0.1]:46661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nvyMM-0007VK-39
	for submit <at> debbugs.gnu.org; Tue, 31 May 2022 05:40:18 -0400
Received: from mout.web.de ([212.227.15.14]:44381)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nvyMJ-0007Ur-AB
 for 14013 <at> debbugs.gnu.org; Tue, 31 May 2022 05:40:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1653990006;
 bh=rXkCZfdqWOlecCcvNUAoPCDXOdSyWcdAHDIN2MaKJl4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=LTmfE9U1fSc7FSNZvLOAec0yoT7Gq26eIfrflr5BYLs9wUL/sF/rx7Z76MGNV0qkd
 R/Qdysxp7nWtmXgYeX9HM9/I5lhc3NRwB2dH2hMzRwcU/QY6M6TJtXtwZH0anHb5VO
 gI1L8AXtNzBdsRHWRZtwSD8VwQjr91KC4Luz13do=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.246]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N6K1l-1nkU6W49f7-016TGg; Tue, 31
 May 2022 11:40:06 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <86pmlyqbfh.fsf@HIDDEN>
Date: Tue, 31 May 2022 11:40:04 +0200
In-Reply-To: <86pmlyqbfh.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 03 Apr 2022 21:05:07 +0300")
Message-ID: <87pmjudoqz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:tAmmbykunWuPYEhxkB7aDPdct/VSu+SOAjglAytBinK5/BZb0tO
 JCYEKbW/ZFf0Q+BFM5cxzJKHu9Oziml2wjKgo6rS5xmQEHBhIxEKYZGol2bb7y65ZuNxHqD
 efMoDeYPUyUGsEuCKHzKl/xzxRSNA9/ioWAhxTDBZcJdPSl4z39fJiDNQGQFx3Z69yESCcY
 9ViJxQbB4l2tg8X6hV4mQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:vS0qkIPCC7M=:d+tzOylCxrH/TTAhOZbX1V
 jGcPDIGq/gT4RinAyOPnlUrP1LRa9K0WAF6Yyq6ARTx2XPALCbf0ayEuH/A5IV/KnzTy2GCWQ
 Pyo60QL3uaYQcfQ1BdIy82gq2z7ZsZ8Li4WP7pAMSDjVfVUQodE9ciiz63k2hBQvL1VIEX5s4
 dXFj0Ue6VPhTJSmHeuec5vvF02D1jNsJOBGfSlXv5bqtj+GshWgZYsN7085bn4klOQ9I5wNQk
 nH/sGKWfpX/PXhs19+3D4Nph9giGv3jxIeODhn9snSD9jAo6a7gVwtw9blnG37inoX9QFCbCM
 TFZgodXZtJTy7ehSfayCPTP0pSKecZu7H5iZltV5/OC9r/2KMxWQPy+fu9rxCAg5li08eVuLz
 AfYtiI6yutAiD4cXxKupzyltaqhzrfTP4ef73MpvjAcqq5ExfSp/5q48o8ajuL9jCnxCS+sPN
 4HcX64cMuVVZspMuQghJUlr7k40G4mt8U02SOVZOvDGI7YsZt3JldljHmUwuRuPaJsGNeliRa
 qMSVtOqUfCOcm/e3fTt9ZlFU924Hdpm12XGnJPmxhsoY5Ohh1ypU5KZ9vARtjn1oC1ThTH3GV
 jIq7d1w1I1LMTd7tZriAxYvwYcaV5fZImznxpEaKgHl3huVIKfN53vYz+6o8hqurpMGMPFYhC
 3zprN8c7dQNPasEM3VulRaSzYVHvqEpi8Ibde0CMvEV/SgDFKw42c0/quxU9AGU7b53SIZQv4
 HCnuvNTWmEzrj64GrXkiCvANrJpFcLtoFYT4/m3+55Ld//aqFfooOYVVL4EtwM7hY8Vn8reBb
 E+qLgQxt0Fhf6eW78Zyk6XZ2zJymmzXCcCNp5IcFS3e/LAaq5Oep5gSF1X/uzCdc2RB0nNr5w
 zk+rbOlyYifzLm1u/c00eKwVlVDWicfulRCPWE3aeVpVNgLkK6kgSjI9vEeycZTN+ilQNyHRl
 Zq6QEAg288GOMFVHZjNBRClzqFBwtMg5h0/q4Xji70GSRJYFEVM4HMpJE22j8qwQ+hlWDeVRm
 uAi5G/sS8sQFLt/yPff9gnsLKKrve+Qz5NyNIJ/xouA3goR7jfqPlq0DjVllHmUsqqIIP2y6/
 vXu+znhapnbDiInlObOVTNCDa43DGaVPpJJzIq0BiKPA1OrXEatnDCyJA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> This works surprisingly well.  Maybe there are more corner cases,
> but something already works with quick tests:
>
> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el

Yes, not bad indeed.  Did you find any corner cases?

Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 31 May 2022 08:33:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 31 04:33:51 2022
Received: from localhost ([127.0.0.1]:46509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nvxJz-0005dV-Qy
	for submit <at> debbugs.gnu.org; Tue, 31 May 2022 04:33:51 -0400
Received: from mout.web.de ([212.227.17.12]:54731)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nvxJj-0005cx-T6
 for 14013 <at> debbugs.gnu.org; Tue, 31 May 2022 04:33:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1653986001;
 bh=CFyA3NFOopVNGAT6k1a1MmDMwXJ5KksaOnwTJzhCRuU=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=fTYTFT2x64S0AUYW1Co1/b6Ae6uHZw3HiCRrTkc7Guv9p5O1h60TjjfgFzS/b1lnV
 pzyBxxESwJlFdkeVK32rar5JN6MYvo5xo8yt4Y8TOnZat0YlVQLIi+0hqf+eHTx6yB
 i82zxaEDaLYBeJBm4MxwOZ/U+kmrGg9UvqumieP0=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.246]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M9IOj-1nqiW63Dzr-006LzB; Tue, 31
 May 2022 10:33:21 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
Date: Tue, 31 May 2022 10:33:20 +0200
In-Reply-To: <861qygal8h.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 01 Apr 2022 19:39:10 +0300")
Message-ID: <87ilpm2jan.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5ZiIQPLq/lfT25N+gBBEwUIiuHDEfPsL9BWtPHXzGqNAdPFylxy
 rdAFvRU89t0OZzWEtp7AvqOHDxhlVsZdxOldJlConu32KW6DbZs6CR3xfTkEqnq3PxEUXXX
 lQ4XIa7UcJSyzh4Q13GyULB6GJYiwLkngOMYgeHdCPSCMvDZjd6T8fypz+f7M7CuSJH9eUE
 TR9vEZBietsFzXI5zaEHQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:wqYMWYEeJfQ=:9XQm4v3VA6nZ/KbhOIfJ2o
 3s9XAQn3yIp4EvxxB2nuZKYwzgizqteS9y9q+lykoXgQ4869yKEWShXItHX8xSL5p/WSfaE5G
 6cn6cYB4KoFTTdoWhOLJU4TLDQcOBEvuH9GM9o5LSXR/Rum95P6UM09HHqZagbtYYDLGjM9KT
 Q0b0yvV6eisnWmUdCrmbPd6aCIV/jnDmc5SD8eg9UudUzax8DnrZ7219anKd4QfY/10Df27UM
 wwISNMWHlui7p4iowCrqgqQDXwb30m4bCK2BKzg/xUCFtQEXtmr0ohtqpvlAYo28BjB/umVFB
 0RR+os6+YQTCDeSW1xOr5fgIjO5O8u8kGjQ2F7pIxBEJ7atE2uTSPnTkWX24xGCRM2MX8RD5z
 YOYrvpsw/+1PH9V8ROcS6dphBucNdGYGLTxT2w05kHtkbRgvecMPKILO4gtdApnzpijySYCs7
 HeP/rK8CsKOmKm+tX7rMtZqIe+3+MFTuUU2upMrtcWhwsZeLSDvkrZgT731c5qtRx/XcsFAqW
 /f2wq/vJ8wsgQ4pUYPz1pieETT0jkB3e7m5KEEjG0YlBJO3YsOlFQJMW98/A6YTu3nb7gTsSl
 mYj0O6tqAYWyd57flJt6cnWyxehgIoaqXa9TPlyPNkQgq8io/4VsYYWZBaqAy3fiY1NCrOTtW
 aPYbYz4WOIItubDBKSnvyrCH/7xogZ93QVOpYn9RC6mgv6FvwnNF41onei48x0CCnxSLwZCob
 BdRMKZtNXW8x+P1zIW2mjvg9/ES63nGH5dJvB0ww7Ow9P5a/IHwyCywZm/E7Rq+wrcq/Qh97j
 Rn2dHpDtKMiek+Frf14UJybAj6JthEQoApplHZZWvYJrtJO+sKwzaj+vpR0e6uqO7oDq+ogFZ
 Kd3Hf6pMrYkBhvdJcHnaY7bGG4sgHh5J40z2i96SIA4cR0m7d5uTLm0gK52JLHw3YW4gXqhfc
 KoGTenIqfIDIRHQohVr4J3DYSMiDn1FpprFbXFcfbvn4V2AUlk5Q1IXRGS8/pSwyrM3Vttkqz
 mASpeRFcMufEEMFwDXilsdHdVWEYLaD7OD5Bo1CcmhVOrj8UiJEKAHFWYi+lu0t11il7h2bZ6
 jDsD9pWs//35iTczqy56Hogch09e2NxarLo/sAqc8lApu4PrRS8oA3d/w==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> So the above rectangle when copied to a separate buffer:
>
>       456
>       def
>
> do you expect it should match the regexp "456.def"?

I would not want that this matches.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 4 Apr 2022 19:51:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 04 15:51:15 2022
Received: from localhost ([127.0.0.1]:53108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nbSjL-0004rO-5H
	for submit <at> debbugs.gnu.org; Mon, 04 Apr 2022 15:51:15 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:33249)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nbSjJ-0004r3-FZ
 for 14013 <at> debbugs.gnu.org; Mon, 04 Apr 2022 15:51:13 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 8DCDE20002;
 Mon,  4 Apr 2022 19:51:05 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
 <86pmlyqbfh.fsf@HIDDEN>
Date: Mon, 04 Apr 2022 22:40:11 +0300
In-Reply-To: <86pmlyqbfh.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 03 Apr 2022 21:05:07 +0300")
Message-ID: <86lewk4oys.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> This works surprisingly well.  Maybe there are more corner cases,
> but something already works with quick tests:

But there is a long-standing bug in query-replace.
The optimization that uses `match-again` and `looking-at`
ignores search-related variables such as
isearch-search-fun-function, replace-re-search-function, etc.

Here's is a test case that demonstrates the problem in current master
with the recent addition of dired-isearch-search-filenames:

1. cd /tmp; touch file1; ln -s file1 file2
2. enter Wdired and move point to the beginning of file2
3. C-M-% .* RET foo RET
4. answer `n` when asked to replace `file2`

After that the remaining part of the same line is highlighted,
i.e. the part after "file2" (that is a symbolic link) in:

  file2 -> file1

This is because the `match-again` optimization uses `(looking-at ".*")`
after the previous replacement "file2" to ask about the next replacement
of " -> file1" that ignores isearch-search-fun-function.

I believe it would be safe to just remove this `match-again` optimization
from `perform-replace`.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.
Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 3 Apr 2022 18:19:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 03 14:19:57 2022
Received: from localhost ([127.0.0.1]:49493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nb4pR-0001jq-9u
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 14:19:57 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:46637)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nb4pO-0001jb-DP
 for 14013 <at> debbugs.gnu.org; Sun, 03 Apr 2022 14:19:55 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 71E8A100002;
 Sun,  3 Apr 2022 18:19:46 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN> <861qygal8h.fsf@HIDDEN>
Date: Sun, 03 Apr 2022 21:05:07 +0300
In-Reply-To: <861qygal8h.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 01 Apr 2022 19:39:10 +0300")
Message-ID: <86pmlyqbfh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

--=-=-=
Content-Type: text/plain

>> I wonder if it is realistic to use a temporary helper buffer to
>> implement ^.
>
> Good idea.  Maybe even not a buffer, but just a string.
> Are there any differences between buffer matching and string matching?
>
> Then first we could remove ^ from the search regexp, and when it finds
> something, then get the found buffer-substring using text properties
> and match it with the original regexp that contains ^.

This works surprisingly well.  Maybe there are more corner cases,
but something already works with quick tests:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=dired-isearch-search-filenames.patch

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index c49e4e91d8..0832ea1ddb 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3202,7 +3202,16 @@ dired-isearch-search-filenames
                          (if isearch-forward old (max (1- old) (point-min)))
                          property)
                     old))
-             end found)
+             end found regexp (i 0))
+        (when isearch-regexp
+          (setq regexp string)
+          (while (string-match "\\^\\|\\$\\|\\\\`\\|\\\\'" string i)
+            (setq i (- (match-end 0) (length (match-string 0 string))))
+            (if (save-match-data (not (subregexp-context-p
+                                       string (match-beginning 0))))
+                ;; The ^/$ is inside a char-range or escaped or something.
+                nil
+              (setq string (replace-match "" t t string)))))
         ;; Otherwise, try to search for the next property.
         (unless beg
           (setq beg (if isearch-forward
@@ -3221,6 +3230,9 @@ dired-isearch-search-filenames
                                                      (max bound end))
                                            end)
                        noerror count))
+          (when (and regexp (not (string-match-p
+                                  regexp (buffer-substring beg end))))
+            (setq found nil))
           (unless found
             (setq beg (if isearch-forward
                           (next-single-property-change end property)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 1 Apr 2022 16:44:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 01 12:44:06 2022
Received: from localhost ([127.0.0.1]:43269 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1naKNa-0005Vl-M9
	for submit <at> debbugs.gnu.org; Fri, 01 Apr 2022 12:44:06 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:37193)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1naKNZ-0005Uy-AO
 for 14013 <at> debbugs.gnu.org; Fri, 01 Apr 2022 12:44:05 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 7A88F20000C;
 Fri,  1 Apr 2022 16:43:57 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
 <877d8935sf.fsf@HIDDEN>
Date: Fri, 01 Apr 2022 19:39:10 +0300
In-Reply-To: <877d8935sf.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 01
 Apr 2022 04:18:24 +0200")
Message-ID: <861qygal8h.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> I wonder if it is realistic to use a temporary helper buffer to
> implement ^.

Good idea.  Maybe even not a buffer, but just a string.
Are there any differences between buffer matching and string matching?

Then first we could remove ^ from the search regexp, and when it finds
something, then get the found buffer-substring using text properties
and match it with the original regexp that contains ^.

> I would like to have a kind of filter that would allow to restrict
> isearch and query replace to arbitrary parts of the buffer, defined e.g.
> by the presence of some text property, anything you can define.

This has been asked before for search/replace in a rectangular region.
So since we have pairs of beg/end bounds for parts of the rectangle,
it shouldn't be different from search/replace in Dired that uses
text properties.

> If we would use a helper buffer that contains only these chunks, ^ and
> such would work out of the box for all of these cases.  I guess that
> such a helper buffer would have to be filled on the fly, successively,
> and the hard part is the details of handling (updating, killing, etc)
> these buffers.

It seems you intended to use such buffers for more complex feature than handling ^.
Because when you copy such a rectangular region to a separate buffer:

     +---+
  123|456|789
  abc|def|ghi
     +---+

then do you want to match the copied parts as contiguous text?
So the above rectangle when copied to a separate buffer:

      456
      def

do you expect it should match the regexp "456.def"?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 1 Apr 2022 02:18:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 31 22:18:37 2022
Received: from localhost ([127.0.0.1]:40431 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1na6s1-0005n5-Bw
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2022 22:18:37 -0400
Received: from mout.web.de ([212.227.15.4]:40689)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1na6rz-0005mo-8H
 for 14013 <at> debbugs.gnu.org; Thu, 31 Mar 2022 22:18:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1648779505;
 bh=b/vQ3lJz8aztFvpuLaa37QVNQICVbAQe+iIAB03Lp+Y=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=KwdRqw74ko35u7XXVCXyA6mZPu45Tw8rv522lhrw90k+cnOME6y/22FFj4oL/IMUx
 C5PqQBShz852HkssteqMSYNffOJpZgNsfXVZAlC+H035FVMTzCyoBRS098OWrD/id4
 KTXA/Z0CUkqONAueyHjQ9Bc3PHFWafQ4EUTRZ0j8=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.59.210.63]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MK52w-1nJ0UZ1Tag-00Lf2O; Fri, 01
 Apr 2022 04:18:25 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN> <86mtha7y8w.fsf@HIDDEN>
Date: Fri, 01 Apr 2022 04:18:24 +0200
In-Reply-To: <86mtha7y8w.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 28 Mar 2022 21:01:03 +0300")
Message-ID: <877d8935sf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:ESrTxF+33gb7sha66hBIEMGW71q9d3x6b8SC92ZPQf8xltjAjQ9
 8T8JL47vasLkehh75ZsFXu9l1r/GdqU3bqfNB5h0WJdysgR4SBs1YJ/Gt5HUxf/A+yf4UYb
 ujeg1sbdaLJQjUGyyhMtKRgTEx+bvbUbtNIDlfCR8iciDXXolGNTWc+4cdoLAzjAAnJVsXn
 tu/GqNzOAiXvht8u3vhXw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:M4y/87fKZ2E=:h5SkGfQDZ4d1nvqw06xCBu
 XVkN6eKM9lZUu4NJh+bbFqC7XpIScpSdtRIWulkF3Meq3E3QsAAShoRMuL/7DT5aUc5jz2Ute
 xud0n9jSC6SOSolnkCSsTSi4FJ2VymgHnfbBV8TxQN8z2Rt6Z6SgccKpda2zNwGCZUcaaxwDc
 Mtu2UEP5Plu4vtaqKOJTtgf30ap+Y86B/7XzHp9uPFE3eBTvkApjigL6rTtOsz1pTx7PEDi2Y
 PODNEtycoYzeZoMVhBo1WGzcpg9qfnZf0FTsnJULXCUiAa9dvqw63ECRDRuA7cL00ObYBULtf
 1LlWu8YLrjUH+fV93p0S1XRe7tvPpFI/p9LskCfge+ZWL5EpSU9aVw3tGk9uNDSPHwgdg2Krr
 prmQ1sDbEHZJVs6NWwl25xCq+5dq9LXgw9kwXRS7If72XG3Cy9ILND1aC4ytFnC0Grjn/zURP
 b3l3rXgc27GK7uVzuG3Ry9RG1upYYDKsCSf+12L9m1JvVdq8hiRZsRfvHRecCUkF/wdKZePRb
 Z3sMG0Cn5D4qGU0yNQEmw8gXkK2WToTr9ygyZLa/DjgWIwtrVafZzRK3AHhuled1Nsk+pRWFi
 xsR54JKaE633ZEm/dQHsdJKOmydfsV6BO9vB0VwMNbmDXCBJlGTHIiQKNLiAC4IJXGd0ef6Uk
 FjcPmYU7xCYkJNKdmbMQgtYjrQb9wJhEQz5CYrrbRmY5Qz2FERYQHlTeq+Q+TBlKX3HBoIwin
 mSCEzxcmZrMmIHv5y3BVugteywITfnOH7N8wlOQ/SBD5V9nrf/KdHAukXNT8MRHZrP40KY8av
 xKMn3miNme48/pEkccz7g7xbYBXE8WT0RLWh6v9+PbF2cRvc31Kaaqre4+J74/nYPp6BWZjwe
 XoGNn16Y+AvpM1nBEamtViD1YH4Yhq7OiP7kXxTIGNjk1IstMpirfABALsdXUPKTU9m+Vp3A1
 gBW9eqMucJfmF+SVd55svHJgH49125KqBHhMPZ6NBL405CMtptqP9Ak1ycUSyBZbNV01KvbX+
 /7OOdMq9WSl78Vk7eztGiEr/EKOdzwwKNVtmM5zgewQgKQ59Pq6AjYqK/dISGAncseDrk0Z0h
 aE3QpQCg20geTM=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> Thanks for trying out.  Now I pushed the patch to master
> that will clean up the platz for more features such as ^.

I wonder if it is realistic to use a temporary helper buffer to
implement ^.

I would like to have a kind of filter that would allow to restrict
isearch and query replace to arbitrary parts of the buffer, defined e.g.
by the presence of some text property, anything you can define.

If we would use a helper buffer that contains only these chunks, ^ and
such would work out of the box for all of these cases.  I guess that
such a helper buffer would have to be filled on the fly, successively,
and the hard part is the details of handling (updating, killing, etc)
these buffers.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 28 Mar 2022 18:01:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 28 14:01:35 2022
Received: from localhost ([127.0.0.1]:59143 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYtgN-0000RC-EX
	for submit <at> debbugs.gnu.org; Mon, 28 Mar 2022 14:01:35 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:42083)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nYtgL-0000Qs-PO
 for 14013 <at> debbugs.gnu.org; Mon, 28 Mar 2022 14:01:34 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 321D324000A;
 Mon, 28 Mar 2022 18:01:24 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN>
Date: Mon, 28 Mar 2022 21:01:03 +0300
In-Reply-To: <87pmnap75m.fsf@HIDDEN> (Michael Heerdegen's message of "Sat, 26
 Feb 2022 05:45:57 +0100")
Message-ID: <86mtha7y8w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>> Thanks - let me try it out!
> ...
> Yes, seems to work well.

Thanks for trying out.  Now I pushed the patch to master
that will clean up the platz for more features such as ^.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 10 Mar 2022 19:29:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 10 14:29:30 2022
Received: from localhost ([127.0.0.1]:35540 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nSOTa-0004sI-7Z
	for submit <at> debbugs.gnu.org; Thu, 10 Mar 2022 14:29:30 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:49743)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nSOTY-0004s2-C0
 for 14013 <at> debbugs.gnu.org; Thu, 10 Mar 2022 14:29:28 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 909171BF206;
 Thu, 10 Mar 2022 19:29:19 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
 <87pmnap75m.fsf@HIDDEN>
Date: Thu, 10 Mar 2022 21:28:24 +0200
In-Reply-To: <87pmnap75m.fsf@HIDDEN> (Michael Heerdegen's message of "Sat, 26
 Feb 2022 05:45:57 +0100")
Message-ID: <86h785obdz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>> > +    (setq-local replace-search-function
>> > + (setq-local replace-re-search-function (funcall
>> > isearch-search-fun-function))))
>>
>> Something's strange here.  The indentation level of the second line
>> suggests that you didn't intend this to be a nested `setq-local' call
>> - or did you?
>
> Yes, seems to work well.

Sorry for code obfuscation.  It's really a nested `setq-local'.

> Only my \= trick doesn't work at all :-(

Alas, \= doesn't work, especially in backward search.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 26 Feb 2022 04:46:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 25 23:46:10 2022
Received: from localhost ([127.0.0.1]:54088 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nNoyA-0005s5-Fk
	for submit <at> debbugs.gnu.org; Fri, 25 Feb 2022 23:46:10 -0500
Received: from mout.web.de ([212.227.15.4]:57679)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nNoy9-0005rs-8h
 for 14013 <at> debbugs.gnu.org; Fri, 25 Feb 2022 23:46:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1645850759;
 bh=fXGz/DlJjx8u2ZkfuszN64YXFAi79YMmD7DayPoXHNA=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=s+LcoWEWF5BfS+Lo4tx4xBblwwmRZspddcUC/L8M2TjAWS5jk6PC92tS9jhd9HIqf
 iwgkOMeWRli2sXHersMFeGxVuO1DE4le8M1TRLmc8X4JzB3qo1tp2IM48oIc6/2tTy
 h1zAfaIqvx5CAbrSjzQRLE/YkZjHR3G1pKUYBhiE=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M8Bvz-1nJgN219b1-005DOn; Sat, 26
 Feb 2022 05:45:59 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN> <87ee3tjecw.fsf@HIDDEN>
Date: Sat, 26 Feb 2022 05:45:57 +0100
In-Reply-To: <87ee3tjecw.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 24
 Feb 2022 01:30:07 +0100")
Message-ID: <87pmnap75m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:6D/dtN3XIbw30mTbaIp1zC3fCRWPnucORqIstknmcGsVYx/CyKB
 iMMHmgS2qvj4QylTgqYZ2jJ0racPlFOIDkc49+wFM9kbYpVVI7+Nu4Bwg9II2fPDGD8K8us
 txu4fBNQIuKGnlpvM2mW7DB0TyGqm69ppJZlxp2xpebHdsQ62j0aR+2Na4Z3g3jWMEMsY29
 n/7ATpvZ7fTmC4+nFnHdw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:NJ+/6Y6dvK4=:wOdtccwtASG5Wfvt0qXeBh
 8lrvdzGBCldJveQSGmfIIuGWIvqgkUZV17uM68JhewwXqSQWt81mfJ0N4pHtCKSdmlwc5N+Mz
 AhBS/LxUaUcwXmdhUgHYOMrtI96Fl2Sr7fiR8XCODSSVmEOHCA2YqGgfZk+XUChFccB/A5hUw
 bVo4jUfpHCnrD2lqTx7SZluRDSX20qEiR4gnoYDyu4RAQK0qFmG7f4NQM4Pn9+YNKxkrXMpfv
 6gmW7zjKms54xUKyuVsA4VJr6HU4GA4bmyKOssg23UH3Y186Gx6uE5CR/RXIneHJXnsdlDa1r
 NuXJ32ITXpbdNIUPRIqWOBRyz2LkP9QLpxWNiR8P4XG0DcI96QsleoweViqEtndwtdL741IRb
 mGX3nWFGNDfRNh3hwJMGryqigRvWl/vdTP3pkslpxARZbDUGFaNH3TATi+okfT6GRPveeuis9
 U4OTH4vxDGNt0uTvAMGFk/xSCdd83ps8g4Q77JLX88BNeIx96t9UgjkWL2UqHozli+eS58UE4
 nxBCasvqPvBWLLPfAEJRd3Gd5CQeMHqlsJrWiRZXIrS5/+zutG2J2lH7DoJpKaLCdTvwdzI/a
 NwPnu362jTdbjTkJvnsaxLns65d8gYflNuEMuqC/fgbYgv8kaGmrI3PBllL86VLZy8QEKTjXc
 RKDQIK/spgrQRgoAiF9nMaddCf5wDuRWRR938PX3uPs2UOlMs2LAWiCUDxiTrOqDbfgcwQv1A
 sM8cJSKNytxUAw01f9AFhm4dd5eV5qtTo1eArrKdhRCDYkWWfa/FUbz8Fo/ONXVqoXbN1pRKK
 5/0hcWcHdKsHdSRIhW4X1xIaPoBpAzVcLM/piNBlJTgHvoo3ciYd2ixvEWY6II4llK5UmBPzw
 uLaOlm77Z0gVlJDJ/JMtBdnD7hOE923lc4+2L/bp60PHDAOfv3RNdOso15wDJ01QbXT5X8EFg
 kNKJZ2PDk4dSfMq3QZBDNjXsc+xidWe/ZqyiCX1jYTfF0g0U+JxsxvuULflXFh9hJkHRFXG8F
 BgHa5oCkHt6vb8qtz43EW3X91jnDyEpwgLJxUoG4zo3cUILjstf5WkFFlwr8lOXtouV/SPgmG
 wTZ0OGgeCyYE1g=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Thanks - let me try it out!
>
> > +    (setq-local replace-search-function
> > + (setq-local replace-re-search-function (funcall
> > isearch-search-fun-function))))
>
> Something's strange here.  The indentation level of the second line
> suggests that you didn't intend this to be a nested `setq-local' call
> - or did you?

Yes, seems to work well.

Only my \= trick doesn't work at all :-(

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 24 Feb 2022 00:30:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 23 19:30:20 2022
Received: from localhost ([127.0.0.1]:46872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nN21U-000355-B2
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2022 19:30:20 -0500
Received: from mout.web.de ([212.227.15.14]:39795)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nN21S-00034r-UZ
 for 14013 <at> debbugs.gnu.org; Wed, 23 Feb 2022 19:30:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1645662608;
 bh=il8o4tRX2Ffk8sK2z4+MLPOLQ7jkfw0fJoSx4PJqS5w=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=ISkTobvAITBIwccuGiUaJ4E4QWh/fNuDD/7ywPwafRIe/3OQuWHgvlAUA6elLXXte
 rhTr6hUytMcvTA0Ym9IZX4a35DoAE124AAmG4M04PfzZOXgzeAL61cXGWI01VJ9kI3
 RTHLhG17pu2bR7ZXuNJ3FGyd09kdLyM5LMBafo44=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MOUxu-1nai5O315y-00QJOy; Thu, 24
 Feb 2022 01:30:08 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y2215rbn.fsf@HIDDEN>
Date: Thu, 24 Feb 2022 01:30:07 +0100
In-Reply-To: <86y2215rbn.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 23 Feb 2022 20:53:48 +0200")
Message-ID: <87ee3tjecw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:DVw1uir08KSVB+8pVqD+VMjtVdZ5r4Ic43zmkG9swaT41TjZ4gX
 PWutPhEZOklUJSd0OE9eyq2RL2kbF4yFUariM5+pCjPM+UO183db3BJvHGCZJ/UEghW1eeZ
 UO2u5RfUCKVo669Ng9J9N8PendbkKdjytOSovNP76stO6EfRe3m28pqTUA2gkWaqrYajjGI
 uqJYe+G9UrzZo6VlbpYCw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:qY3OA97ON98=:ZhSPQdz440fv+tC5UtxD32
 QJkRNUtP7SJaMNG9CxrNuVeKRBikZkpLOH5pHMtLH2lNmC+pwW49F46MtjcKf++rQWjQGAAKk
 //1UXPW1MUZ15Mo1b1e07zr1IAGhwE0Qxp8yVSfbj7RKjfouu9FB2Plem4yj4r1a1Azy3z4wF
 wJMJBx/r67uDgWrr/s6gpgKLv1mvrGpF5IT0UDmP3t0BMhyVT1u3CyCbI2Z3SXi1CReMsXO1x
 ZYR2K6W/vuDyMcA3u2PblTfGmGCuehTQtnvLd74z2Un44E6B0GIpO6Yf8hi/aKJoRLJKHJdUc
 wbUb+uzxlIV2bELKPjSOaWUN+cG3UDBC6XA7PG5s0ZJjb0iCXmxQ8ccx5ZKmJhTsXKGE6WdIq
 sfEpfKF9d5v1UWkkQDkljE3xFvilrJCtkrK1yTYXu6pvb3b4DiZilETgrK74TWqjJZaeC19cD
 FjKHW09IS7iFa8z+OqS+DWiIUvZlv959heW9ejAw1uGx9gG3dGf1Pu2BU6Qv78G4U+/BzZWiq
 i/igazm/q7bBrUIUbqiTiRLStXFKDQN9AnxM7Md1nNQdwUcifg3WWQ1cazt5HCTZlo+2aLg0G
 gYYV0yesakyzJXuL1dmgV0myR7aIgENyyCTklDo3LCQPZHgQTo3v7DolvMGiiwdVrAiFufXwY
 9rJzaRHxNjB0t3i7n6LI0PfuvI/pyDNohQ/BI/rTXObup9a3ItTjE8+ASzal9JAyIT6TwRGw4
 KjJHTCglHI++WvoZYa60QJQZZqM2oWA64X0lVXJ2FTHZpvPxKVOKovLMsoUQul5FtV/3XK2dD
 fQONpS9MZCVdRzdO1+Yiv6v6wCY5eswOmeOTSi227Y5Fj0UFGjMDpcUnLc/lsQVKdnIl/Gu2Q
 ruba4lq9VfYbaoLx80JsnpDLgLiEq9ANZvfkT1cDjS5ZNMD0CpVWwT+F4o7Q6c2190ZHT7jpm
 3ujCn6ciQEYBz8LylZ5TgevFnz5ogqgho/3gCIgQ1oqM9C3v7Bi+2B5wC/f4YuQbjsqw16Yte
 GvN6H5iKfPVGKouc0jHtsnz966hih+SPE7D+8d7BZCMlleXqMjgXlUXL/i72H+xTO7YlDWAqM
 kX+EQCPpjGNT8c=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> Everything is fixed now in this patch, i.e. search/replace works ok in
> dired/wdired buffers (except ^ at the beginning of filenames that is a
> separate feature):

Thanks - let me try it out!

> +    (setq-local replace-search-function
> +    (setq-local replace-re-search-function (funcall isearch-search-fun-function))))

Something's strange here.  The indentation level of the second line
suggests that you didn't intend this to be a nested `setq-local' call -
or did you?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 23 Feb 2022 19:16:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 23 14:16:19 2022
Received: from localhost ([127.0.0.1]:46518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nMx7b-0007VB-6S
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2022 14:16:19 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:48051)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nMx7Y-0007Uu-G6
 for 14013 <at> debbugs.gnu.org; Wed, 23 Feb 2022 14:16:18 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 9D4A71C0004;
 Wed, 23 Feb 2022 19:16:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
Date: Wed, 23 Feb 2022 20:53:48 +0200
In-Reply-To: <87czjn39yf.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 16
 Feb 2022 01:56:56 +0100")
Message-ID: <86y2215rbn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

--=-=-=
Content-Type: text/plain

>> >> +  (add-function :around (local 'isearch-search-fun-function)
>> >> +                #'dired-isearch-search-filenames)
>> >
>> > And: Is it intended that this is unconditional (I would expect a
>> > `dired-isearch-filenames-mode' test)?
>>
>> Currently it is unconditional when it's using isearch-filter-predicate.
>> So maybe it should be kept this way since it's what was used for many years?
>> Or is there a reason to change the current behavior?
>
> Ok, then better let's keep it.

For more customizability I added a new user option
'wdired-search-replace-filenames' enabled by default.

> A different thing: I found that
>
> | + (setq-local replace-re-search-function #'dired-isearch-search-filenames)
>
> is not correct - of course, `dired-isearch-search-filenames' is a higher
> order function (used for the around advice), not something suitable for
> searching.  With the patch installed query-replace in wdired errors.
>
> What's the correct value - the current binding of
> `isearch-search-fun-function'?

You are right, the correct value is the current binding of
`isearch-search-fun-function'.  Everything is fixed now
in this patch, i.e. search/replace works ok in dired/wdired buffers
(except ^ at the beginning of filenames that is a separate feature):


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=dired-isearch-search-filenames.patch

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 56897826cb..92f2848334 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3147,11 +3147,11 @@ dired-isearch-filenames-mode
 When off, it uses the original predicate."
   :lighter nil
   (if dired-isearch-filenames-mode
-      (add-function :before-while (local 'isearch-filter-predicate)
-                    #'dired-isearch-filter-filenames
+      (add-function :around (local 'isearch-search-fun-function)
+                    #'dired-isearch-search-filenames
                     '((isearch-message-prefix . "filename ")))
-    (remove-function (local 'isearch-filter-predicate)
-                     #'dired-isearch-filter-filenames))
+    (remove-function (local 'isearch-search-fun-function)
+                     #'dired-isearch-search-filenames))
   (when isearch-mode
     (setq isearch-success t isearch-adjusted t)
     (isearch-update)))
@@ -3175,12 +3175,42 @@ dired-isearch-filenames-end
   (unless isearch-suspended
     (kill-local-variable 'dired-isearch-filenames)))
 
-(defun dired-isearch-filter-filenames (beg end)
+(defun dired-isearch-search-filenames (orig-fun)
   "Test whether some part of the current search match is inside a file name.
 This function returns non-nil if some part of the text between BEG and END
 is part of a file name (i.e., has the text property `dired-filename')."
-  (text-property-not-all (min beg end) (max beg end)
-			 'dired-filename nil))
+  (let ((search-fun (funcall orig-fun)))
+    (lambda (string &optional bound noerror count)
+      (let ((old-pos (point))
+            (beg (when (get-text-property
+                        (if isearch-forward (point) (max (1- (point)) (point-min)))
+                        'dired-filename)
+                   (point)))
+            end found)
+        (unless beg
+          (setq beg (if isearch-forward
+                        (next-single-property-change (point) 'dired-filename)
+                      (previous-single-property-change (point) 'dired-filename)))
+          (when beg (goto-char beg)))
+        (while (and beg (not found))
+          (setq end (if isearch-forward
+                        (next-single-property-change beg 'dired-filename)
+                      (previous-single-property-change beg 'dired-filename)))
+          (if (not end)
+              (setq beg nil)
+            (setq found (funcall
+                         search-fun string (if bound (if isearch-forward
+                                                         (min bound end)
+                                                       (max bound end))
+                                             end)
+                         noerror count))
+            (unless found
+              (setq beg (if isearch-forward
+                            (next-single-property-change end 'dired-filename)
+                          (previous-single-property-change end 'dired-filename)))
+              (when beg (goto-char beg)))))
+        (unless found (goto-char old-pos))
+        found))))
 
 ;;;###autoload
 (defun dired-isearch-filenames ()
diff --git a/lisp/wdired.el b/lisp/wdired.el
index ab3b91bbe5..229a266d33 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -155,6 +155,11 @@ wdired-create-parent-directories
   :version "26.1"
   :type 'boolean)
 
+(defcustom wdired-search-replace-filenames t
+  "Non-nil to search and replace in file names only."
+  :version "29.1"
+  :type 'boolean)
+
 (defvar-keymap wdired-mode-map
   :doc "Keymap used in `wdired-mode'."
   "C-x C-s" #'wdired-finish-edit
@@ -217,6 +222,7 @@ wdired-mode
   (error "This mode can be enabled only by `wdired-change-to-wdired-mode'"))
 (put 'wdired-mode 'mode-class 'special)
 
+(declare-function dired-isearch-search-filenames "dired-aux")
 
 ;;;###autoload
 (defun wdired-change-to-wdired-mode ()
@@ -237,9 +243,12 @@ wdired-change-to-wdired-mode
               (dired-remember-marks (point-min) (point-max)))
   (setq-local wdired--old-point (point))
   (wdired--set-permission-bounds)
-  (setq-local query-replace-skip-read-only t)
-  (add-function :after-while (local 'isearch-filter-predicate)
-                #'wdired-isearch-filter-read-only)
+  (when wdired-search-replace-filenames
+    (add-function :around (local 'isearch-search-fun-function)
+                  #'dired-isearch-search-filenames
+                  '((isearch-message-prefix . "filename ")))
+    (setq-local replace-search-function
+    (setq-local replace-re-search-function (funcall isearch-search-fun-function))))
   (use-local-map wdired-mode-map)
   (force-mode-line-update)
   (setq buffer-read-only nil)
@@ -319,11 +328,6 @@ wdired--before-change-fn
             ;; Is this good enough? Assumes no extra white lines from dired.
             (put-text-property (1- (point-max)) (point-max) 'read-only t)))))))
 
-(defun wdired-isearch-filter-read-only (beg end)
-  "Skip matches that have a read-only property."
-  (not (text-property-not-all (min beg end) (max beg end)
-			      'read-only nil)))
-
 ;; Protect the buffer so only the filenames can be changed, and put
 ;; properties so filenames (old and new) can be easily found.
 (defun wdired--preprocess-files ()
@@ -438,8 +442,11 @@ wdired-change-to-dired-mode
     (remove-text-properties
      (point-min) (point-max)
      '(front-sticky nil rear-nonsticky nil read-only nil keymap nil)))
-  (remove-function (local 'isearch-filter-predicate)
-                   #'wdired-isearch-filter-read-only)
+  (when wdired-search-replace-filenames
+    (remove-function (local 'isearch-search-fun-function)
+                     #'dired-isearch-search-filenames)
+    (kill-local-variable 'replace-search-function)
+    (kill-local-variable 'replace-re-search-function))
   (use-local-map dired-mode-map)
   (force-mode-line-update)
   (setq buffer-read-only t)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 23 Feb 2022 08:39:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 23 03:39:41 2022
Received: from localhost ([127.0.0.1]:43745 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nMnBV-00027X-6L
	for submit <at> debbugs.gnu.org; Wed, 23 Feb 2022 03:39:41 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:53435)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nMnBT-00027F-AO
 for 14013 <at> debbugs.gnu.org; Wed, 23 Feb 2022 03:39:40 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 19027240007;
 Wed, 23 Feb 2022 08:39:29 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y222n7da.fsf@HIDDEN> <87tucqbqkj.fsf@HIDDEN>
 <87mtiibkqr.fsf@HIDDEN>
Date: Wed, 23 Feb 2022 10:13:42 +0200
In-Reply-To: <87mtiibkqr.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 22
 Feb 2022 23:27:08 +0100")
Message-ID: <86h78q9hsp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>> There had been a change that made property changes be applied delayed on
>> the fly for faster startup of wdired.  This now happens only for lines
>> that the user edits.  Could that be related?
>
> But I remember that you were involved in fixing fallout of that change
> for the isearch side.  So maybe a different change is the culprit.

We fixed only the error raised in query-replace by adding save-match-data.
And now we are fixing the matching only within filenames for Emacs 29.
This means that Emacs 28 will be released with this regression.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Feb 2022 22:27:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 22 17:27:21 2022
Received: from localhost ([127.0.0.1]:42801 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nMdcu-0001ox-Tk
	for submit <at> debbugs.gnu.org; Tue, 22 Feb 2022 17:27:21 -0500
Received: from mout.web.de ([212.227.15.4]:55361)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nMdct-0001ok-0X
 for 14013 <at> debbugs.gnu.org; Tue, 22 Feb 2022 17:27:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1645568829;
 bh=FB0xXFSOoGCh/GJfUJAmpveSBkZ1sopIAxOIiDg9Z/k=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Xat61P4qa9grzLe5iYAQnjqmZa2e98Vd9P2HaGbl/ZHumYJwEqpjDOeQPdpDsZ69x
 pGNHoqACZm0UtuMISTdMyI89ariTMJF5vZgYbq741rjMF+Vg/marhTmi/hicqIN4gI
 z06tQ1DWvoLh1k3itYuTdpix6wUFtlFS01hzc7Qw=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MUlDJ-1nmeom24Dx-00Qq0n; Tue, 22
 Feb 2022 23:27:09 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y222n7da.fsf@HIDDEN> <87tucqbqkj.fsf@HIDDEN>
Date: Tue, 22 Feb 2022 23:27:08 +0100
In-Reply-To: <87tucqbqkj.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 22
 Feb 2022 21:21:16 +0100")
Message-ID: <87mtiibkqr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:liaUNp60ZHXG1uHJruh/D2s5xJtmoVWLbm3c/ssE/eWkBJU33hJ
 r407jR2IdPlh//tUnA+KErz+Vqo1zPvjoHpv2UfQrt/37/wD7rgHI8HHVRgNFz3JUqVv7tb
 A4ZRrGpQVrH6Wo44AnInZhzi/oRelzc5qmt1AOM+36lc5YBhuVoiwuW7IYoAexnhFpxVHxi
 FblZZST5YRORmRJaad28A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:knzBWKPQUio=:Sn7rW1kOi+YspUA3Q7xp1Q
 s2x1wPDtWq+Qe+VW837TTW2rlQWNRwYEfQW/IAyKM5VDOemT2yhEiZufr9N2E/fzoiC0Dx7YL
 yVh9H6b1ea6aLtcUFLFy6hwmjULART+DB5O2GjaIM6bTGpG74i4LVLpdEgHfrZxD2TTYZkjZL
 UegpqqMqG32hMclJa+KB302fIMB0ax5SFteGKPtMb5DoHNy1rhdId2nFBEVxa8TfCcdyla2tt
 jfq6iYGh33atshokUQAIVdT4yqZT13QaMqEIOWybpJ6FLQ4xuHiTfvGrRSHbVTSzITu3JNdWK
 MCrAQFtYjfjVOTh3kICiFVKw0u5vbtq/BKeFn4i+O86C0DBAeTVkYgskvXA+oWEu3j/N4SxB3
 HbljU3TS+z0aTfiGzsyAavcwC9q1BtJRDur3vsKRESQVTxzXeTy6u9PKM25ErxNUQRRO7dFB3
 ksZxTBJyW1UN/wnz9QVDq80mFZz+xjQENuGM+oEZoSetgCIfKIgpnW2WpCsFQnn9MQ1MjCrhR
 gnCp2eF6yyBbul8JQIEouT+reFxCv252ZenMNRAb6ZcgTa8iTT3f5do56NgL0DynPV1tKmbUM
 aptfE4R/+FgGg0ZCoUwwPGYu1E3VwwaWkaMcb2vIEb8XshgNVhPJS9OxyPRPIg7oSQi8MseW3
 9GxNel6J1GQIQcAsO9+legvE9drPuUePZ2C9uQB2McOI5QhEoUM9wOuyRvk9Y0/mUHzSxcfCq
 BxtT3Ej5C4CGQ8+25zGF/m4TMWDqPzBr82Go7cy2Hp/Dwh8RRH28OJKKC7J16usAUdknM6ZjN
 qqT+0sfMVczRUP7m0yfRXzj0Xy614WsaNz+ze+PtagDMTijAlTuSasQI/Ny0jlYrYeXEqF0ED
 bULQNvtD/y0O0N1+MlZAJ1jKZEJI0ZxhKVt+g/8RVQWG19J584tWHi1iWTBe016kgKEsHC4wu
 /Ab/tjJ124e3/pBn1kCRcfxzzSTTrXPadZTS7eYYVri/JmlCLEXEoYqhNP+8DDU61fsuYtX7K
 lC+gDD6rnbPz8buT8ofgku4E7BSvGjfLbDAPF2f0ggtt75ECIjSNH0lPPtmgCBbw0dQYi2a0x
 GvcPBd6iMoS8x4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> There had been a change that made property changes be applied delayed on
> the fly for faster startup of wdired.  This now happens only for lines
> that the user edits.  Could that be related?

But I remember that you were involved in fixing fallout of that change
for the isearch side.  So maybe a different change is the culprit.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Feb 2022 20:21:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 22 15:21:29 2022
Received: from localhost ([127.0.0.1]:42732 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nMbf7-0004ep-6t
	for submit <at> debbugs.gnu.org; Tue, 22 Feb 2022 15:21:29 -0500
Received: from mout.web.de ([212.227.17.12]:57541)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nMbf5-0004ea-Hi
 for 14013 <at> debbugs.gnu.org; Tue, 22 Feb 2022 15:21:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1645561277;
 bh=Ei0TLhwENd9iNM2YYAyG74Rimu/7+ITjLxbQOQo/I6k=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=s1oC7/Kq6eVrp1nudd1sNv66R6uM+b5axGgceYgz/BSCLrOOqIQukJOZz9rzID1t3
 omi7EKxHkXooF8bgCGMX+zrNQgujsEapz3094Qb7JD6RYomkPXMTjgtl8qPKaEm6Js
 qKntKDq9K0asJvCgxGIqrLqk1kGIbnw3TWVt9Sy8=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M8C09-1nIV3O25Cd-005SWv; Tue, 22
 Feb 2022 21:21:17 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
 <86y222n7da.fsf@HIDDEN>
Date: Tue, 22 Feb 2022 21:21:16 +0100
In-Reply-To: <86y222n7da.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 22 Feb 2022 19:02:57 +0200")
Message-ID: <87tucqbqkj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:f9tnkXFck15H13iqknUa1Hfjn2XCBRCCJPddzO96/Vb07DXzFhL
 qo5CLolxdcLBaVIdoch0VnyAJryS/lT/bthhMIXknb1u7CjHEaC1bRvo3gx/CMmEmaU5O8E
 8Ou7edr0wvMSzBgH5EiSJ2NFXq/TIFGVCwlb1oATCe91ZKX5ZAELhU79QKaApyQ3mQZD5sX
 k3xTyC5QjFqjt27JGCvbQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:L5UGMFytpbw=:w15BIHFiij1zk9x5qAYapX
 tmCkfOEfi6AYqOmJBuJRzsyytFjRrArjHz3CDsz0gjdfe21YkOGsX0wynMFEufieuibo55dqB
 H1s+Ooa/MQY0rvBDuPxYBsZzxK0Jw2cWJxx4LeLBjSL/JWhb+nv44fI60KFs+FJh9XaSf0VSe
 9WK68P8K/p/7x7J1SMjvSpMzbJLPDRWgN7U0xCMZ7LS/Vs1FpROlm2uL5LMefR+gppsLdACX3
 XemH+XZ1kfhlqPUCpM1Q1Dd1/iOvVb2aDBVeu3Eg5RSXjVB3wfJd7j1BHyBo+0Sm+PQLv74+c
 rymFQj+Aqyb+fXjMTAVnuRSYV96wGsCNXxgiDyDR8Npa3JPRl+IKgMlX1uKLvE+Lt9d3NJ62b
 iroP2LAxcxY29jwhSjfxwLckF2gVV2tv5pzhjQdgJmxgJJBxc03mtScVC50hkkrrUuaJ3RHJn
 IvGFxEt1EwI98qKZHI/Vs9fTwwdFtupae78ArWq7rik81pplR1ESfJ6+gTqZRcaiPplAjaI1/
 S1kmGlIZLxnn3lUHfmF5AgQlk0CUaVySJSSAC0YzUFj5x29JMTTGeW8I8ahZNjsIPfSVEKPu3
 wYVJHmEyiThljaMCc3LTucXHU0xrnn76dd3nkWVh82N4+4MsBHUfkGg+eQybZJcyHrDwO21UA
 /Na60xo1F//guiATPBKu/wVo0CoaY/dJ99cIm4VNeUatB7fdH0fUTIUGDZ5ZzgYyXBJ/WD6QL
 S4E3qEC7GzoTp0uiE+M+UY0JQtesHeFF5ahKy0Gu+wK76Dq5ZBCgFM9TkhEf55WYp1pv5ZWKQ
 zhaYL6eB7n9WZ7oImkgBwg4z8+0I0caaIrkyRVITO8pZ44Iom99zCe8e7shbi2lP19uzVpPFa
 HDIFb2hB+o6OIEc+iFnucCkz35Sh/pc9PWF90rB4GMPy1XYdSXaJuusbouFmiXwLuGFqdZLyc
 Gztf79PwEJWLGEpBobbC2OesfKt7itM+C3jsVBeogDbeyzI1ZwCb1XT9IVu6lBvsRQ6HPS3Z6
 2tHEavYDuGPXQom4vjIAzJHdHCtUnwnRferXCbglZqfEkC9WWZdunQ14jK1GEjOi/eng4X3/G
 z8mKDpR6SAHloU=
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> While trying to find the correct value in WDired, I noticed
> a regression: in Emacs 27 search/replace skips read-only parts,
> but in Emacs 28 there are no more read-only properties in
> WDired buffers, so search/replace matches everything.
> Looks like quite a recent change.

There had been a change that made property changes be applied delayed on
the fly for faster startup of wdired.  This now happens only for lines
that the user edits.  Could that be related?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Feb 2022 17:27:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 22 12:27:46 2022
Received: from localhost ([127.0.0.1]:42533 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nMYx0-0003sB-4S
	for submit <at> debbugs.gnu.org; Tue, 22 Feb 2022 12:27:46 -0500
Received: from relay11.mail.gandi.net ([217.70.178.231]:57517)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nMYwy-0003ri-7l
 for 14013 <at> debbugs.gnu.org; Tue, 22 Feb 2022 12:27:45 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 03416100002;
 Tue, 22 Feb 2022 17:27:35 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87czjn39yf.fsf@HIDDEN>
Date: Tue, 22 Feb 2022 19:02:57 +0200
In-Reply-To: <87czjn39yf.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 16
 Feb 2022 01:56:56 +0100")
Message-ID: <86y222n7da.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> With the patch installed query-replace in wdired errors.
>
> What's the correct value - the current binding of
> `isearch-search-fun-function'?

While trying to find the correct value in WDired, I noticed
a regression: in Emacs 27 search/replace skips read-only parts,
but in Emacs 28 there are no more read-only properties in
WDired buffers, so search/replace matches everything.
Looks like quite a recent change.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 21 Feb 2022 01:16:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 20 20:16:17 2022
Received: from localhost ([127.0.0.1]:34266 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nLxJJ-0005pR-4c
	for submit <at> debbugs.gnu.org; Sun, 20 Feb 2022 20:16:17 -0500
Received: from mout.web.de ([217.72.192.78]:60273)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nLxJG-0005jF-R4
 for 14013 <at> debbugs.gnu.org; Sun, 20 Feb 2022 20:16:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1645406168;
 bh=FjqJhf0/cBfZbe0pqcyfsZ03h9slmPPxU7gr6/s+brM=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=ej5dvkjuPSdk8kNqa/qNsuZO4rVXugWJnWY9loYZ0QA9CJDyMdXCXbqaiTz2cr8o3
 +SiXYa24wufzTC60SNw8uOmBAuneiLExGCmzDIkMbgMcZ48Ns1MmhTIhdFvSLVQLLt
 naHZ6FyciU5t08D8Say8One77CNKLBy/mL8R2dHU=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MjPU0-1o5R902qWg-00kvNx; Mon, 21
 Feb 2022 02:16:08 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87sfsk961i.fsf@HIDDEN>
 <86leycoszt.fsf@HIDDEN> <874k4z38pu.fsf@HIDDEN>
 <86czjmzwi2.fsf@HIDDEN>
Date: Mon, 21 Feb 2022 02:16:07 +0100
In-Reply-To: <86czjmzwi2.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 16 Feb 2022 20:11:09 +0200")
Message-ID: <87wnhpyq7c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:pmv1LUipytCgS8leMh1oUb5bqqQwKD9ab01nLkV8BAI+j2tiIdy
 Dnvthp+AImw3fHXNUFGxybz/j1xDA01ZR2CMLdpwLxfBXAhubpZRlGpyxytah+jcGRoUlZ3
 HMpfaaZ0234UG7lVV+IX5reG2+gJYCjiFTtKkOktaacbZ+5ZZwdR+0/pkYxY0to/Bo+VHMh
 XUND3vM9adMjDKiCoS6BA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:qPLXSrka7uI=:AXAtCT2k1sN/PSrewK/egn
 mAmpfNfY1blHCChAN9hlC55XJmj9mjplc4oKo2UcWLWHEoxP9r/YOWQKOSLxC8TvNWyHyNCBk
 CopO4zwxjIdKe0XoT1GuAKCmVac6xDdMwYakUqR/hs//I+srpyjAEI8tfVnnKJ+TH01bv1ew/
 uC+mM2u/6mlGAWfmoYTIMJBInGBw4klYiRCsA73iIP8VMVxuk9g0sxWBHlh4m13Mvw+ow6Wlj
 9gH95Rz+W2tIMH7NeLXFs5Q6tYmq7PPpakvTHjZz7M8TnDAZidjvLKS74S0pMOVdx4DH6NcYf
 s+kHBQxwxo7elNFDVlkdpKBMcqJiNCv7oFql3LrMbZuwr4NCymRlUbcIwXrkSbp8ea2PP8ccg
 3rHU5lilpj2A0fLIkKcJrUbToWRb0HYC8MAw5ZOmp5/BMJK3OcB6AYG6PiuHsoN7EFre5FLYb
 raaPRNqnY/tLwYQ4JOspduswgm6U9QyFE3yT9f4kGLPNLCLag6iQuW9A/pt9H/D0N2LNixd8X
 UAlq5Ebx52mSt3OLw7K8dACuANi0f4KtLH+BYExSvO6r/n3t9dtywpclQd7Zxg2mVGGQ0fBEp
 anOqq786Yo6hXjBXwy6loCvMLsB3hK8ZcCUbFD6HrPj2OyUFdWAqvLcd+iUHsZ42ivMDJsJ1q
 IJrW5wuJ0j/HjCbovL8Wa48rCrwixdh8sKPga2wTmlipYxcPA0wDZnTSMV7IMsHIwfW5Xs36m
 1JAyKXW+XI9vVh9dn0g+x8/aUhi3hNIYArcbWQ4h35ear5u7eC1GSa+P0tdC4zUiCmWbLUvjY
 zodI9v8Vy20z0SqERiUzy9po2GeeXbRVQf9JoVT23/yNNYCpZrLy6oN7fxw38qMef659BtxuY
 04vwRt6MMYFa7M2zcY2gwFjIvL+rzNdvvJrriQI8jhtFU/qrqgeNheqMRbTgTZEWhUuLr07ak
 lJhWrbK5QTcGzXa8HNxrK33insn4AArb0W/0jMHS8lkqippuvMbBoiBFvTI2xlRJKPiRPlZh0
 sI0T6+K9l9ebO1Mquo6L3tLT7JtwOzzUSWcFajwZJmFt9Lho4wfvlO84y4YFQePNnt/nEheS5
 UvTEcYNtklT1nw=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> For the backward search, the BOUND argument corresponds to $.
> This makes the search function more complicated, but
> this is doable, just needs more special-casing.

Ok, cool, then I think this is something I really would like to see (and
test).

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 16 Feb 2022 18:44:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 16 13:44:58 2022
Received: from localhost ([127.0.0.1]:49440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nKPIQ-00063u-By
	for submit <at> debbugs.gnu.org; Wed, 16 Feb 2022 13:44:58 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:48799)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nKPIO-00063M-4P
 for 14013 <at> debbugs.gnu.org; Wed, 16 Feb 2022 13:44:56 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 606676000A;
 Wed, 16 Feb 2022 18:44:47 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87sfsk961i.fsf@HIDDEN>
 <86leycoszt.fsf@HIDDEN> <874k4z38pu.fsf@HIDDEN>
Date: Wed, 16 Feb 2022 20:11:09 +0200
In-Reply-To: <874k4z38pu.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 16
 Feb 2022 02:23:41 +0100")
Message-ID: <86czjmzwi2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>> This works reliably only because the search function puts point at the
>> beginning of every file name during search.
>
> I'm not about non-interactive searches, seldom use them - can something
> like `dired-isearch-filenames-regexp' be done non-interactively?

It should work non-interactively as well.

> Anyway, my complete idea was: whenever we provide a special search
> command that limits isearch to certain entities, like file names in a
> dired buffer, we always guarantee that point can be matched at the
> beginning of each entity with \= (and maybe also \` and ^).  In an
> interactive search \= is quite useless (right?), so we can use it for
> that and avoid hacks that would probably be worse.

This is more complicated for backward search where \= should match
at the end of the file name, so \' and $ should be replaced with \=.

> We would still not have a solution to match the end of the entities,
> however.  Fortunately for files in dired $ works (by coincidence).

This is still not reliable since the dired line doesn't always end
with the end of the file name such as "filename -> symlink" format.

But with the previous patch this works because of the BOUND argument
of the search function set to the end of the file name.

For the backward search, the BOUND argument corresponds to $.
This makes the search function more complicated, but
this is doable, just needs more special-casing.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 16 Feb 2022 03:58:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 22:58:15 2022
Received: from localhost ([127.0.0.1]:47090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nKBSJ-0004PA-Cf
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 22:58:15 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20685)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1nKBSG-0004Ou-Mq
 for 14013 <at> debbugs.gnu.org; Tue, 15 Feb 2022 22:58:13 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4BE88442410;
 Tue, 15 Feb 2022 22:58:06 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9D925442417;
 Tue, 15 Feb 2022 22:58:00 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1644983880;
 bh=fqoE3YOBPOsOkHmalWDdwmnB70ObVb8DirYRadRVKsY=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=Eb/qrfE6GbruAi5k6JQwBw4mYfioO9pz8bUwxgfgIs+OJaExCcy5ygNKHhfvDwXF5
 hARgKQpYrCR6whZ+fEvvqrn8lEncsAQk2IfFe3tStmiEa7Jjx6FkPd01pWb7D/hrQZ
 JgyZXhaRyKGqfmyHZcSqiRN97Lqb7GWx1RdmviXp4KOvfhvYwPemSI5LEBDRW9HHwe
 afdwmEL1VBAFRoybtrAYc55tiZUwJMjdKhq6x8jU1kXAVkbYpJNRAYQYwlfrKRUhdE
 sdTHMzXQVz2YYIe/H3Swm7lVfFMEqkSpuAThn6U+rO0Q0YnDvoqEDvGiVQpv2Jw1F1
 8Bl+lxGZFBd3Q==
Received: from pastel (unknown [45.72.237.157])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 644B21209EE;
 Tue, 15 Feb 2022 22:58:00 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Message-ID: <jwv4k4z8nvf.fsf-monnier+emacs@HIDDEN>
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN>
 <jwvv8xhipdx.fsf-monnier+emacs@HIDDEN> <878rub39ap.fsf@HIDDEN>
Date: Tue, 15 Feb 2022 22:57:57 -0500
In-Reply-To: <878rub39ap.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 16
 Feb 2022 02:11:10 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.081 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 14013
Cc: Juri Linkov <juri@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> I don't know if we want to handle ^ specially, but if we do we can use
>> something like:
>>
>>     (while (string-match "\\^" RE i)
>>       (setq i (match-end 0))
>>       (if (not (subregexp-context-p RE (match-beginning 0)))
>>           ;; The ^ is inside a char-range or escaped or something.
>>           nil
>>         (setq RE (replace-match (concat "\\(?:"
>>                                         directory-listing-before-filename-regexp
>>                                         "\\)")
>>                                 t t RE))))
>
> Will matches then not be discarded by `dired-isearch-filenames-mode'
> because they start before the file name?

It all depends on the replacement regexp the code uses.  I only used
`directory-listing-before-filename-regexp` as an example.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 16 Feb 2022 03:36:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 22:36:43 2022
Received: from localhost ([127.0.0.1]:47062 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nKB7T-0003je-Ln
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 22:36:43 -0500
Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:63602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1nKB7R-0003jS-Pz
 for 14013 <at> debbugs.gnu.org; Tue, 15 Feb 2022 22:36:42 -0500
Received: from pps.filterd (m0246617.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21FNJDl3003066; 
 Wed, 16 Feb 2022 03:36:40 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2021-07-09;
 bh=pV4nZDFjkmUYGfmZ28ujkhp2FFhI7MpPvcy26++vHUo=;
 b=Y98y0Y9apzqcVSFyYBlbUXkrxhpj22CcN+GAZOU6emMWTqH4UfNEES1yI/+06tJNxXk3
 DylKG7WrAUTtJSjupluOA+Gr/mFRAWZXWj0HR4YNo5dOh/hHpM/HB9923a2HO5FSIi5f
 0Mq00LWkSc+me9wxRw78I96BChxuEWxH08onjdtLBYLWF1JrMlEG60XTxt5Yim5UgdXf
 osw+yfaLx56AoR6W4FwgopOH12kifWm1wox/yYpVP05BRA0G/SkJ7d6VjH4moH8pUNSP
 h/EOf6KkxppjV6J8dnmZvoQ1yfzrch07xrEi17RDUhTakihjOA/ggNdNrlE/4IadjIPm 0A== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by mx0b-00069f02.pphosted.com with ESMTP id 3e8nr90c4h-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 16 Feb 2022 03:36:40 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 21G3VRlT134128;
 Wed, 16 Feb 2022 03:36:39 GMT
Received: from nam12-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171])
 by userp3030.oracle.com with ESMTP id 3e8nkxkjya-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 16 Feb 2022 03:36:39 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=de3emkKO3j2ObWPYsgQzfTpxpNdskNA9j0RiZtkJnnvdfSrAX/iu9Xu1rq0vqA+CzNPVtzfFiW4++BLz3g7H151OtHu4L0sTLyn44hJqMH2PvqEbXS0yIxteq2C/gr+9iOQfW+HByQR3MIitOtIbI5I+nc8t7Rpmef4tonv4kWZRo0lUhr6cJNDwsZqfv2c7Z2m80pgBiTd6OzUTO6MpsKQ4swrOG/wEa0kR55FuwiIp1ZVOydO6L9/mN7r+UBYHgWSgC6jzMOl4UEQNDSHUBkie1LtEZHXE6qam5s3WePHHhf/yactXD2UgWPcF3O1B3cMeNoGrE+CGXnC9LrFwIw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=pV4nZDFjkmUYGfmZ28ujkhp2FFhI7MpPvcy26++vHUo=;
 b=lD1RQyHzsZJ7OX/F4waKv5j145adxI+MiLSbRLqiHd0lwjjqm3KOFZJD0Xdj/n5zN2aPFhtAql+pOqGixM+taM7uz57Q2RysSdvQ6mzDRZ8Pc0VRYfcrztQv0VqaASk5iC2L9w1ozERUFsa/kHeO0RHRtR/B997TOQnM+7bhtEViuB/G0XNjpK8ibSfKM6o/4FdhNsgmTmjEwr691Kp4V0U8SSr4Vcw1mme2KbDZIGVGqhc1XzgElPWCxQI111savqKZK/7uI8dN8WFiCZMOYtdAgFMb5UdrxaxDEimD3Bc44K3QZQQAfXmi4gwCO/v9lKEOyhiFB2yqXx9BPFMLFQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=pV4nZDFjkmUYGfmZ28ujkhp2FFhI7MpPvcy26++vHUo=;
 b=rBNb+p8c16s1Bsaeccm1+xw8qYxetJcCyy1pItt84Fb/KAaCHjISMI1IvxQyu0W8y6HTGPRTWWZzyXX5CNtj5zvIDX1MY+Zo29t4EgVxyVneeAszmX3RmhpNXgWfj+7CNIEJjjZmEvjEpYmdly1w32InXnGbjpS7O8AAiH9sp58=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by SN6PR10MB2847.namprd10.prod.outlook.com (2603:10b6:805:cb::12)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.17; Wed, 16 Feb
 2022 03:36:37 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::6d28:e29d:4c51:6d04]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::6d28:e29d:4c51:6d04%5]) with mapi id 15.20.4995.016; Wed, 16 Feb 2022
 03:36:37 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: [External] : bug#14013: 24.3.50; dired-isearch-filenames-regexp
 is matching text outside filenames
Thread-Topic: [External] : bug#14013: 24.3.50; dired-isearch-filenames-regexp
 is matching text outside filenames
Thread-Index: AQHYItPU2saAFCoet06KSpzhRcy0u6yVecKA
Date: Wed, 16 Feb 2022 03:36:37 +0000
Message-ID: <SJ0PR10MB548847DBD65C7B14865416BCF3359@HIDDEN>
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN> <86zgmutwx9.fsf@HIDDEN>
 <87o83ab67d.fsf@HIDDEN> <86r185520f.fsf@HIDDEN>
 <87sfsk961i.fsf@HIDDEN> <86leycoszt.fsf@HIDDEN>
 <874k4z38pu.fsf@HIDDEN>
In-Reply-To: <874k4z38pu.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: c59ef309-d46c-4ab4-2ce6-08d9f0fd895b
x-ms-traffictypediagnostic: SN6PR10MB2847:EE_
x-microsoft-antispam-prvs: <SN6PR10MB28475C36D826DB0BF5794201F3359@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:7219;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: l+4VO9HJcLRCcINFaC2dfwXVyz9Wb6MXMOnc9KwVg6rHkTxHCjvbqEYzSi/c7FDp8pdXHcFazM3/KdaMp3D+IpMpQnNWmxUUMdZ1YrS9RB+FrX/SZms62C6UXmegTy/oukb3y0GTx73iNKEjottS35ED2Gc5dJDEFIMMvfPH+BZxa/y0BhXB6nuhQtSnS7HeHXe7DtiXYU7TznCuhd+CzOMHXp4oVlZKz+YQ72b6wMM6giFW/VZCbYEyUst55TWGQ2H8wGGDczHMhhxlzgalAUSmcrBCwVpt8OPRznm0qzXs4VR/mtDru4dyo4jNIXF1P1tVQ/3BWmFVneeN+lyL+1ODuNWKJ+XPzvDJTAWOvRhGL+kSsU2gfguyvfvTq6hjCZyVuyNjU6ePEis6hAUxMkJwpEK82K+U2cSYMoyzK4Fa4L8502J/IOw9x/PcGy8A48CvNWHT2mwxn3iBRgzyFiXQm7xqVY96Qvfy7JRLyCoh2kD0+mcgt0vssjIepXoXx1XHeOdc77RHLA5lKETR1QO/bbto5e+UXe8CW2ImRco9e2D/p5amhYCTKif5hX1LXbkAtqW6SePmGQ0RURRdTDj54NwFc2Rqg/H3KZ1HVcOmASnSVf8pYuJj9whDh9PYIM1W7cD2yNLhhq9Z43BCaigzx+wP0J4X752tTQXowtQRBYmqMR4dji58vXVl3H9iiKAd7Y7UrQpN75YPUdhFLg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(13230001)(366004)(5660300002)(316002)(186003)(83380400001)(52536014)(33656002)(8936002)(9686003)(6506007)(4744005)(44832011)(7696005)(110136005)(71200400001)(26005)(4326008)(76116006)(508600001)(54906003)(66446008)(8676002)(66946007)(66556008)(66476007)(38100700002)(2906002)(64756008)(122000001)(38070700005)(86362001)(55016003);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cBrTAblLm1x651u/koEny42toX4DPYCWodteS4BCXpFIYBxMeOzVSd/0WK0e?=
 =?us-ascii?Q?4YACaQdNA7i5hcE1jExjkqcMyth4MV0PJKOQq8TCnlMKDYxag1H5cdLeFBS5?=
 =?us-ascii?Q?7H7F0sugifAYzGV6a+Pj0Mnop8ge09uOIqacCQdQ3SFqn95NCDdlqRfAcmFq?=
 =?us-ascii?Q?V0Pir8NtH/LpqzIOJXLfoosHjuGFZDpyHD5ic4aTyioyQ8y4CpxpDkUwlvq+?=
 =?us-ascii?Q?5kg8BlegtU+HrPhMtAh4EEi6LE9GQyCXjrtv8frTMFkxXDC0vtmR5qm01JAV?=
 =?us-ascii?Q?IBiWbGHw+WIxLyJxzNB9ZfIc6xFCWuq+XTezSVCxDB7t9sL5Abw2ahODq2d7?=
 =?us-ascii?Q?j5sa9Tsyjy8E5II5crHbi8PUz64dqwRlNMER4GKU1hBz++pY13RoT9VYM7M+?=
 =?us-ascii?Q?BsAwLoKgB7xU61sjp/RpU8dahJ4eksodPdFjbBouavMjdw34OwpTyL031VEe?=
 =?us-ascii?Q?Iu3ulqqq86QfLrEEOV+d5kYHg6rKK9I76V3899u9ZLPc33ZXJpbggYnn5k2I?=
 =?us-ascii?Q?x3Q4YrTgbRfa1KEbCovdAS2wV2XFHPk+9LSD0S7JNtKYkSn51J1nYqepBt/P?=
 =?us-ascii?Q?gjCzzdkpAvPgpf8jZDcnBeAoXTFYRi2usPHM0zZRrJOsqyZxZ31ZiIlHEYg3?=
 =?us-ascii?Q?dsVzGoZECnJZDTucYmfP/pVx1cUar+MysUDtVDjF4jIgImVm4Wh+HUlqfYqj?=
 =?us-ascii?Q?DdU4vNpJppHijlGyPIN8Ul4YLOQLpuYG+ZwrSyV33QOWvyz+hcuM5SAUVOw2?=
 =?us-ascii?Q?bIKazW7/qQbeIerUiCnFjiRFkY8c100pdAR/wOQrtsqUOgk+ebo/p490OiQv?=
 =?us-ascii?Q?QDg7c9Kr3mYuaVhbTx7Tmsqa5luR0DWjGBn8shO4Jy1cQw9OPfCx0TBHO9U3?=
 =?us-ascii?Q?LzDZUnYk4b+LnXMWvcGrH/ohk2EypLvtEOdsXKe41Lz11sdMuiHgfqE27ksH?=
 =?us-ascii?Q?dOthJm959YBwt51DP+N1RKZodcCsOYJzPGUWdg5BxQJr/zc9Oh/P6fRpB9zG?=
 =?us-ascii?Q?dUFSg8n+13X8w7VsBI6r5Jcbn0zyIh2ZozIpH18yEIi2BCX0UgtYD548msJ0?=
 =?us-ascii?Q?kGIOwYqtpDZwduf8UdZtPKSIc08fLmv+cGBZq3HdxVPQ1OY4pitfJC5jn+ZR?=
 =?us-ascii?Q?cZz1RC90sN4oYZ8anN/QEEWOeKRmSaQ8RFqDjnxQ+zSCSCiQzVm91yq/BSfa?=
 =?us-ascii?Q?XRzFHamiZpurVnhhr1fdAKcvhYBLgirEzVv5W7wMSy1lne4Q+DsMRB4e0fAq?=
 =?us-ascii?Q?zawPLS3cwHqn8NZLeV+nd64L3txnAwJwRllzx5YlEXOjYKRY5/TjIuygyzWN?=
 =?us-ascii?Q?sUwIfelH8QFmfirKO9YH1X0ROX0k+3SRSoLxuJOjU0hTNKg2HxlzRlQvMyq0?=
 =?us-ascii?Q?iLHZk/1yHFh6Uf0bINF1ZGm57BjPeR0Ibgkm5YpUmOP/7gj6qSPa01HSly2S?=
 =?us-ascii?Q?+JI4DL1k+Xb3tfcq6KXARhSy0tFAgYpEQXB/yNquGfo4HFNfaFA0+Gc6rj7Y?=
 =?us-ascii?Q?4vvb80RBODeqNiKYvyxvBhK2whsy4OzlawH9q3c7ComGuSlV0DwD9CYSI4N/?=
 =?us-ascii?Q?pw0ba/lPT/aejoC5r++oSAGWQP8KCIdsLAckgbnkwi0ZeFqPJ/Z/daJSI7sR?=
 =?us-ascii?Q?Gw=3D=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c59ef309-d46c-4ab4-2ce6-08d9f0fd895b
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2022 03:36:37.0544 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: YtFNliMMPxHv+IS8h0Iu4ceir7xonMx5MG8l0i71cH7t5xptEB+k9KwBpPKebdIxiBpbuB91x5eN+XHxzDQbog==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2847
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10259
 signatures=675924
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 phishscore=0 adultscore=0
 mlxlogscore=743 mlxscore=0 suspectscore=0 spamscore=0 malwarescore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000
 definitions=main-2202160015
X-Proofpoint-GUID: Ac6ItAwODMyGD2fnHNrPu-Agtl-GbMbU
X-Proofpoint-ORIG-GUID: Ac6ItAwODMyGD2fnHNrPu-Agtl-GbMbU
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>,
 "14013 <at> debbugs.gnu.org" <14013 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

BTW, I just noticed that a couple of functions (commands) in dired-aux.el b=
ind _user option_ `dired-isearch-filenames'.

Personally, I'm in favor of allowing code to do this, as long as its doc ma=
kes clear to users that this is happening.

But I thought this was a strict no-no - anathema for Emacs development.  Wa=
s this - as opposed to jumping through a hoop adding an additional variable=
 - OK'd by the priests? ;-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 16 Feb 2022 01:23:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 20:23:54 2022
Received: from localhost ([127.0.0.1]:46943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nK92w-0005v9-0i
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 20:23:54 -0500
Received: from mout.web.de ([212.227.17.11]:50849)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nK92t-0005uU-V4
 for 14013 <at> debbugs.gnu.org; Tue, 15 Feb 2022 20:23:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1644974622;
 bh=aiPMpDcv1fubTHDrqUiVncrEpcC9bjxVa9a1z3ejSqw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=EbbiJCT0XfutFM1M31PVyBVHBtj/XXH+B9o6XCtnyzKIMZeCEUAcX4gIEhjuXGGG0
 91oqh2yOuTdvRAz6Ju9cgKQIdLg76ck8nC5Xtway0XJGrEZzHpha/zKV0S8P7xwZbX
 TmzoJTubE+6/1QwWQWVsYDLKOQwDng7WQTuAS5u8=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MTvw0-1nl3b21ply-00R42A; Wed, 16
 Feb 2022 02:23:42 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87sfsk961i.fsf@HIDDEN>
 <86leycoszt.fsf@HIDDEN>
Date: Wed, 16 Feb 2022 02:23:41 +0100
In-Reply-To: <86leycoszt.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 15 Feb 2022 21:25:06 +0200")
Message-ID: <874k4z38pu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:kiUk2MyEfk/XBz8JBe5sNgYsvZ8dcFU8FjxPDA0CjIX4Y5sYoIC
 AIzcTUMlav0hCV9+BDcMZMZbzDzuN+hcm61NqdsOVJsrn3SZw41YQjf54E6QoNgCqtpc3uR
 JRZ+Su1hqPY7FCxit86FdM+iuGCMigqcV51QCnXU2NWOCc4YvhqxgfSy6Ak7ZpkD/ChvRMc
 G0ta/lgonc18ZHwIXO9yA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:gFoUSvIDixo=:CD/lCWTUuGFheL5tFC9EJg
 x6o+ZCMFCR8SEHmQB3Yrtlp8TVBq9ks2EhhpsUcouH/EHY9FnV0v5+zzYRziJH1RHB8jlkCxu
 nigTQlygE1M6Qvu9y3IMdm6DLIFTBIlLwsros/mw+JkrrWMIbTpPvfmcSnXTCsE+5E7d52TLM
 yLBHpPmWh6YrQAaiO2iXTuXEg+W/0ryoA/nYuvh6yGQTHDxfhY4R1rpDY2nZH7EfeVlHozV6K
 bc782nbHmGxmb5b1BlrkGpaOfniRofjXXHoppVh7U0RSs45UaXuyZUv5zUed+Bgk6hNjAAQNi
 q5qRhyHlJqVED1kJX7JciW6Y2O9ZybN+g97m0KuSldUJs/VcU+f6sTNmYAWrl8g/qBy6u3bBo
 wciW81Nmlasm2SkzzVCyYh7dOE/EYxbjjju9GT9/qI/8V2/Nycm4fDhlLp+R1Z6OKghyG7w2o
 8DrHQnIZGUypMY++HLsnMdWl/wKe+wXo+CgcrPccZ7c7r7p631LxKXKFy/s6WeVNL+EtCDC/X
 wKxt6KNYfqMy0UXbNJxBuI7izu+X7QjEBW74sb1M+NFC3e6iVOy6yUbJeC/jmSHbvYWn9WOs6
 NrPXhdEb+r7KsjLL676kjdZBpBVFBd8Y0zsWTRS2PZiFnzdkoQkKg4yr2CAxZn9ZMiFJFnOs+
 6Z5bPA254VrAssZ/KFBTHpJkfMS7sK/X9ORMW5yrvyFltjQ6GHlmGpu27c7frsbnXXasQqzkh
 3IkHuaxtkm5cqovhMjMvNKuRgCw6o0Pm7p9akYPxi4aiCHtv6IoDJUlZLg7SkWlxOPT6yJ//q
 6L2T2hx03dwoBqPi6ovroqyIhS1Qbn/m5tzrOpgnl3RMevTNNwt9c3cS6SVkf69hwb941kRMc
 z0EcMD7XPv+WLVDI8NtwkNFIY6n4mUzJeeomclPacMX9Ds9v8o0dwEL441LNTw8bebkpra2yK
 wg6toOLSp1wIGsQgHrNvvqxXe7e03IGjUNN2gq7GPOrqJc/rdFPWO84aGITAHad1oX/mqhMo2
 VBvpTMvkY+GJ+uKy4slxScxjX6T6Pu5/ooUZDx5EsbW39gPwU209sg7Enza3EXDAKVk9M3UiV
 DY5aSODyE0UPpA=
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> This works reliably only because the search function puts point at the
> beginning of every file name during search.

I'm not about non-interactive searches, seldom use them - can something
like `dired-isearch-filenames-regexp' be done non-interactively?

Anyway, my complete idea was: whenever we provide a special search
command that limits isearch to certain entities, like file names in a
dired buffer, we always guarantee that point can be matched at the
beginning of each entity with \= (and maybe also \` and ^).  In an
interactive search \= is quite useless (right?), so we can use it for
that and avoid hacks that would probably be worse.

We would still not have a solution to match the end of the entities,
however.  Fortunately for files in dired $ works (by coincidence).

> Since ^ is easier to type, maybe both ^ and \` should be transformed
> into \=.

Why not.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 16 Feb 2022 01:11:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 20:11:22 2022
Received: from localhost ([127.0.0.1]:46810 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nK8qo-0005Qy-M4
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 20:11:22 -0500
Received: from mout.web.de ([212.227.15.3]:57859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nK8qn-0005Qk-6L
 for 14013 <at> debbugs.gnu.org; Tue, 15 Feb 2022 20:11:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1644973872;
 bh=8kosQ65kxmHhq4BZbeb2tEHCAGUf815LSBDZTpASY3E=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=USPi3IfMA224PV+gBTnwlvYWk+2vQsGuUzX1HKTk76ryRf9a1kVLJ9XBPporA2URP
 cnZomh+AxVEBoh60NCimESRRAfJoerMVul6B+HZBQ5NGLkqLwF5Wb51WByIh/hUpKd
 PQqldWKDP6cRV1dVZGA7uIKRCrnOcsL25BI1mrLg=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MxYbN-1oDUSH0NUv-00xZwJ; Wed, 16
 Feb 2022 02:11:12 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN>
 <jwvv8xhipdx.fsf-monnier+emacs@HIDDEN>
Date: Wed, 16 Feb 2022 02:11:10 +0100
In-Reply-To: <jwvv8xhipdx.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's
 message of "Mon, 14 Feb 2022 07:59:54 -0500")
Message-ID: <878rub39ap.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5DdIqMt6Rhl98bnyhxKoGaMozSWdMPmYMtMmkbWBM9r6O/Un5/I
 bPjGTrol0ogVYT/4bxVJtGkmuTl1gfhE5r6BeZsoIO7IeOwE2YPRCWOb3aP/73fEb/GTh5g
 jbifCIYvPhinzg8M8afYk2Vw+0v4J1lhR3iWHunPwqj8C8aUnq6Q+zQ/ACoTG92oGLgzuqP
 nklkhqT4Sky8Ox7TlYwsw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:+Rs0EulFtck=:m89T4E1mfB6edXTZHRbnvd
 CqgtMWXUj5G5YclD3o7SBvDheq8Mtj/dIwz/6irv0hW3VvqKbcGeATSRfpGh/sIfcQeyZjQPq
 lm+AOdPxZ0fgVgxllym1uLnck9ZpfOnVwuDa2rXdkEO/wmtMeBPXlYagdkTwvHccw/cQcQu60
 EIJ1jiuoHWzx2Oakc1byTf7P8kBNfWfD1vKbbLsfmK+S4mixc6MCczVX5J0ucE4Nv05j7uqgZ
 uK3Q9UZExrgfJvLrgf3wtN8+3jgybRJA7k7Vli4VAr4fDFdbprQj+h9MgmrUIqqhpSk+JEwKG
 e7jqo2K3rKPJjY6wXTz495joKU7lEncFevU0rfMXU4qk8dcN2xwtqxKDtX3ayqINpGixceSxF
 uhxM5F4elogT/ugLkU5m2ZRxtJn94VbC3Tb6nGEunEAJWy7NL4Xmopk7Mla4tuy9Q4yc+ypmS
 HjzbRUq1YlVLzxRRY7qLxVszQiiE2q/xRvlU7vwy/OHgnrUOOUl/5kqbOpx3SawsW6ue2tgZZ
 IPnx8K46R+WeNHU830h1uqq9W6aCTNuNQbc7pYzHRUywkIYCKSXATxAkwOgksEQBpg3YF5EST
 YtMIaVLesIF7+u0Er9ZcG6Wx9ypRpYTC/GWieOXwXzYPnpWlW4OlYJQrswbth6Bjod31GMOOS
 u9zZjj0dJUKD2NhwrNbp0NRfbtRZCdLSdrXbM66qvuvqJhG8BYO07svgdRFeq86DL/Ex08yk5
 h0wHTk2x4mqGBEUCaS9Tgp9OupHstBpMoOLJbIEdRw61gZgGHQODRDK6ST1agW8A42Le1k/sK
 uXfa9zhrYULTmgBNEVG30yPaUDfRaDLQS0IjJm0CQw+ZE6Ec4ZBZ9ogxZsewKnQsXBEnDD5if
 0AjHjUk8OLwHFH7e+7ysd8bQOuGg29ftaPo5lqW8V9CE+BOsheZvdUkpOVI/puSnfHbByjr5k
 tEsYSg5sRNEusPevc33nDyDlJyMF3ArXVpyaDCW1A23/x/XlGd4TXIkrgx4PgwBFLwb3k20ph
 YSwqw60zL7jAZYutij4YatKR8Ia4EPzYC90ybv+m4ZZBYHVEVUVBTZgBtKEWtrfjG+dPwhjJj
 oNr7UouUG+yKd0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Juri Linkov <juri@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

> I don't know if we want to handle ^ specially, but if we do we can use
> something like:
>
>     (while (string-match "\\^" RE i)
>       (setq i (match-end 0))
>       (if (not (subregexp-context-p RE (match-beginning 0)))
>           ;; The ^ is inside a char-range or escaped or something.
>           nil
>         (setq RE (replace-match (concat "\\(?:"
>                                         directory-listing-before-filename-regexp
>                                         "\\)")
>                                 t t RE))))

Will matches then not be discarded by `dired-isearch-filenames-mode'
because they start before the file name?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Feb 2022 01:11:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 20:11:30 2022
Received: from localhost ([127.0.0.1]:46813 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nK8qv-0005RJ-Sz
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 20:11:30 -0500
Received: from lists.gnu.org ([209.51.188.17]:44628)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nK8qu-0005RC-KE
 for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 20:11:28 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49568)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1nK8qu-0001L0-Cg
 for bug-gnu-emacs@HIDDEN; Tue, 15 Feb 2022 20:11:28 -0500
Received: from mout.web.de ([212.227.15.3]:58237)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1nK8qq-0000ZQ-5d
 for bug-gnu-emacs@HIDDEN; Tue, 15 Feb 2022 20:11:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1644973872;
 bh=8kosQ65kxmHhq4BZbeb2tEHCAGUf815LSBDZTpASY3E=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=USPi3IfMA224PV+gBTnwlvYWk+2vQsGuUzX1HKTk76ryRf9a1kVLJ9XBPporA2URP
 cnZomh+AxVEBoh60NCimESRRAfJoerMVul6B+HZBQ5NGLkqLwF5Wb51WByIh/hUpKd
 PQqldWKDP6cRV1dVZGA7uIKRCrnOcsL25BI1mrLg=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MxYbN-1oDUSH0NUv-00xZwJ; Wed, 16
 Feb 2022 02:11:12 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN>
 <jwvv8xhipdx.fsf-monnier+emacs@HIDDEN>
Date: Wed, 16 Feb 2022 02:11:10 +0100
In-Reply-To: <jwvv8xhipdx.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's
 message of "Mon, 14 Feb 2022 07:59:54 -0500")
Message-ID: <878rub39ap.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5DdIqMt6Rhl98bnyhxKoGaMozSWdMPmYMtMmkbWBM9r6O/Un5/I
 bPjGTrol0ogVYT/4bxVJtGkmuTl1gfhE5r6BeZsoIO7IeOwE2YPRCWOb3aP/73fEb/GTh5g
 jbifCIYvPhinzg8M8afYk2Vw+0v4J1lhR3iWHunPwqj8C8aUnq6Q+zQ/ACoTG92oGLgzuqP
 nklkhqT4Sky8Ox7TlYwsw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:+Rs0EulFtck=:m89T4E1mfB6edXTZHRbnvd
 CqgtMWXUj5G5YclD3o7SBvDheq8Mtj/dIwz/6irv0hW3VvqKbcGeATSRfpGh/sIfcQeyZjQPq
 lm+AOdPxZ0fgVgxllym1uLnck9ZpfOnVwuDa2rXdkEO/wmtMeBPXlYagdkTwvHccw/cQcQu60
 EIJ1jiuoHWzx2Oakc1byTf7P8kBNfWfD1vKbbLsfmK+S4mixc6MCczVX5J0ucE4Nv05j7uqgZ
 uK3Q9UZExrgfJvLrgf3wtN8+3jgybRJA7k7Vli4VAr4fDFdbprQj+h9MgmrUIqqhpSk+JEwKG
 e7jqo2K3rKPJjY6wXTz495joKU7lEncFevU0rfMXU4qk8dcN2xwtqxKDtX3ayqINpGixceSxF
 uhxM5F4elogT/ugLkU5m2ZRxtJn94VbC3Tb6nGEunEAJWy7NL4Xmopk7Mla4tuy9Q4yc+ypmS
 HjzbRUq1YlVLzxRRY7qLxVszQiiE2q/xRvlU7vwy/OHgnrUOOUl/5kqbOpx3SawsW6ue2tgZZ
 IPnx8K46R+WeNHU830h1uqq9W6aCTNuNQbc7pYzHRUywkIYCKSXATxAkwOgksEQBpg3YF5EST
 YtMIaVLesIF7+u0Er9ZcG6Wx9ypRpYTC/GWieOXwXzYPnpWlW4OlYJQrswbth6Bjod31GMOOS
 u9zZjj0dJUKD2NhwrNbp0NRfbtRZCdLSdrXbM66qvuvqJhG8BYO07svgdRFeq86DL/Ex08yk5
 h0wHTk2x4mqGBEUCaS9Tgp9OupHstBpMoOLJbIEdRw61gZgGHQODRDK6ST1agW8A42Le1k/sK
 uXfa9zhrYULTmgBNEVG30yPaUDfRaDLQS0IjJm0CQw+ZE6Ec4ZBZ9ogxZsewKnQsXBEnDD5if
 0AjHjUk8OLwHFH7e+7ysd8bQOuGg29ftaPo5lqW8V9CE+BOsheZvdUkpOVI/puSnfHbByjr5k
 tEsYSg5sRNEusPevc33nDyDlJyMF3ArXVpyaDCW1A23/x/XlGd4TXIkrgx4PgwBFLwb3k20ph
 YSwqw60zL7jAZYutij4YatKR8Ia4EPzYC90ybv+m4ZZBYHVEVUVBTZgBtKEWtrfjG+dPwhjJj
 oNr7UouUG+yKd0=
Received-SPF: pass client-ip=212.227.15.3;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: Juri Linkov <juri@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

> I don't know if we want to handle ^ specially, but if we do we can use
> something like:
>
>     (while (string-match "\\^" RE i)
>       (setq i (match-end 0))
>       (if (not (subregexp-context-p RE (match-beginning 0)))
>           ;; The ^ is inside a char-range or escaped or something.
>           nil
>         (setq RE (replace-match (concat "\\(?:"
>                                         directory-listing-before-filename-regexp
>                                         "\\)")
>                                 t t RE))))

Will matches then not be discarded by `dired-isearch-filenames-mode'
because they start before the file name?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 16 Feb 2022 00:57:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 19:57:09 2022
Received: from localhost ([127.0.0.1]:46790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nK8d2-0004r0-Qf
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 19:57:09 -0500
Received: from mout.web.de ([212.227.15.4]:35329)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nK8d1-0004qG-0t
 for 14013 <at> debbugs.gnu.org; Tue, 15 Feb 2022 19:57:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1644973017;
 bh=udoG3cbC+11KAuQFljWOn2HuD2dVt2d2fLa9lfhj3/s=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=JiKhQtJPuMPsYUamprHI4h1cFrZxtPrd9t7jo+yRcjMCu2HFYE07PvCvAziozXT5/
 LBtGDdGYqwwPuT2cT955fqMQkJgA4QfXLOK4iOzdu+psMbHQK3NY6snyHJRwb4t2ra
 og01WsQj0SnuVUIhEneW5M3t8MPfveRFWOpcQcM0=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MALeR-1nRaLq1cEt-00BlDl; Wed, 16
 Feb 2022 01:56:57 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN>
Date: Wed, 16 Feb 2022 01:56:56 +0100
In-Reply-To: <86r185520f.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 14 Feb 2022 09:41:04 +0200")
Message-ID: <87czjn39yf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:45RsPkcnhL0WmlKXR5bPqFCYwyQGiecHwVz3PA0fJDSISLPuYas
 82R1WdXXAbYQEhS4gb9SxNjwBrVxQ9byuLn11615KRzhaKVc7Knt7t27ZQGVMtP4CTJ/fdK
 YJSFYOlXs3tH4XgFuHIv/4SMeplDppXjuikL9T/cdiez7FeDzdA3PhK+oS5gwWdLY0yYa87
 wBmqNVZHs3XXc5yJRkT4w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:xGjVUBFODIQ=:KLZwAOlyM7M8gXs+3SQya6
 RKHLVGhfjwVIEOyAYuPoHkDI7WMf6YFtKBzcputlUhMO3LgxyxV1WXm8K+w5AX5q1Vc1H/XyV
 OMLxdqJLDU3G1THnzUbzG6kZhFLEgzEKnXRZMo6eJY0b1Rgk79ApgKd14RQS0VKg28b7e4A9U
 IwcFFeegQvzu8rFEXYow+Rv8jpeP0c1CHKKrj+2P5M49cNUjTI0yTELDqYoLnFNGn+oZK7dMu
 GBpJRVMEI3cgGwzoeFMea28xiwN6vrX2c8oU18CwrUDMj1nhWWyUUqa7ej+XXQJqCPOA4youW
 QOxX3vQGr9laGLCS8aOydFzc0OE3W0tbFOLxMV6y79fnbJ/IklBz0ZbTMJE2jP+fJAHjO5Zpk
 yvEXTbImTy/mhvmcgBgQTY5cDkBuL9C8dMVM7f8gel4n1CbFzrSsp70afMGxfR58tXbzCz0ai
 KgUde2lje2+6bmYnDIbAXJtxxCStoukQjDxDsdN4yJiBGvkdYR/xuVFj4NfeaOYJCwoml2HRW
 8DrqEsg4pPpKbIkHVKu6xOWGJfQBpxm8D09agCbn8r/QYpYX36zVvE6gY6idpcUsdKkMoJsPU
 Fh2/oZrlYelYBKJEUtz1qEOJvW8H6d/Kv/ju0i8VYbWr88x5N7oWiv7YAZG0mmQbilWMqVk+j
 RE9ZWf2RO0uygF5It0emov7quwX1U0CcJgzbc8wbeiu7vJeQ4YkyefXtUe232T1/2lxU5ZoEv
 /FPz/qdlILEyiRjLrBNAwF+qqVRyCbi8DravSrWHbdlhmkUcMxW54SBQmJvUr+CvYRlGNRq0J
 BEvW1dcIs2KDOmjA4kI8Ow1A7M5O62b8t5N7PlgoH0H+mMo/uf9RF+pb9vx+mBq8qRQneJPB9
 NcmkhL4M3EIk+rfZBFCGREtkFUy82EqTokhHuNHVMz5cM48nOh5c1ZLaVjjzyEy2V9TCikJ2M
 HEcJzV5uIdn0MVbiEI557fwLyZ+lNxdyIXFgSOv0qZe9FTnzmAzLPWO7vX4YFO7tiNA7hsnAn
 Kw4ocwlS2fcA0Iw0hhSyRQ1Gqi455UEX5LaubRfoCcitWQHGh28Him5+A+20k4l8cO9hRWhHp
 dQRcWmt82Jd93I=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> >>  (defun wdired-change-to-wdired-mode ()
> >> @@ -238,8 +239,9 @@ wdired-change-to-wdired-mode
> >>    (setq-local wdired--old-point (point))
> >>    (wdired--set-permission-bounds)
> >>    (setq-local query-replace-skip-read-only t)
> >> -  (add-function :after-while (local 'isearch-filter-predicate)
> >> -                #'wdired-isearch-filter-read-only)
> >> +  (add-function :around (local 'isearch-search-fun-function)
> >> +                #'dired-isearch-search-filenames)
> >> +  (setq-local replace-re-search-function #'dired-isearch-search-filenames)
> >
> > And: Is it intended that this is unconditional (I would expect a
> > `dired-isearch-filenames-mode' test)?
>
> Currently it is unconditional when it's using isearch-filter-predicate.
> So maybe it should be kept this way since it's what was used for many years?
> Or is there a reason to change the current behavior?

Ok, then better let's keep it.

A different thing: I found that

| + (setq-local replace-re-search-function #'dired-isearch-search-filenames)

is not correct - of course, `dired-isearch-search-filenames' is a higher
order function (used for the around advice), not something suitable for
searching.  With the patch installed query-replace in wdired errors.

What's the correct value - the current binding of
`isearch-search-fun-function'?


Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 15 Feb 2022 19:30:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 15 14:30:57 2022
Received: from localhost ([127.0.0.1]:46490 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nK3XK-0004TM-6a
	for submit <at> debbugs.gnu.org; Tue, 15 Feb 2022 14:30:57 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:34057)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nK3XI-0004T5-8C
 for 14013 <at> debbugs.gnu.org; Tue, 15 Feb 2022 14:30:52 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 6008B1C0003;
 Tue, 15 Feb 2022 19:30:43 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN> <87sfsk961i.fsf@HIDDEN>
Date: Tue, 15 Feb 2022 21:25:06 +0200
In-Reply-To: <87sfsk961i.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 15
 Feb 2022 04:12:41 +0100")
Message-ID: <86leycoszt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> Just an idea: Seems that currently \= matches the position at the
> beginning of the file names!  Could we maybe just guarantee and document
> that?

Nice finding.  This works reliably only because the search function puts point
at the beginning of every file name during search.

> If \= works reliably, we may also transform a leading \` in the regexp
> into \=.  ^ is not so important in my eyes, it's easier to type than \`,
> but the semantics of "beginning of line" is not as clear in this context
> as "beginning of the object searched". If \= and \` would work, I would
> be very happy.

Since ^ is easier to type, maybe both ^ and \` should be transformed into \=.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 15 Feb 2022 03:12:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 14 22:12:55 2022
Received: from localhost ([127.0.0.1]:43188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJoGt-00010k-B8
	for submit <at> debbugs.gnu.org; Mon, 14 Feb 2022 22:12:55 -0500
Received: from mout.web.de ([212.227.17.12]:38847)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nJoGq-00010V-9w
 for 14013 <at> debbugs.gnu.org; Mon, 14 Feb 2022 22:12:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1644894762;
 bh=hJyNNi+7mvq7Iyx7V6pWmlmr8FPobJWmRewgba1KN2U=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=V2SUu4UXETIgTqgFmvz9//gAhCnjM74GlMmdaaxYsIzD2fG7cu9RNo3ZjnLlD76Zz
 Ui9nXCOoYGrjS0vbjVU8vPv9R4xm3z8rDojIaB2SNBC4R3nMeB6OqUQefo4TdgKp0Z
 QS1tQ/Xf+JrIzkOR0QniNh07o51BClHNVfEX3iZE=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mav2X-1nq6wj1vuV-00cMig; Tue, 15
 Feb 2022 04:12:42 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN>
Date: Tue, 15 Feb 2022 04:12:41 +0100
In-Reply-To: <86r185520f.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 14 Feb 2022 09:41:04 +0200")
Message-ID: <87sfsk961i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:LO8Kh6ry0pDkuKxS+D0OpNw8o48eviqr71YoJQ7xzSD0ZX2RGK9
 qNBalu66WD4SQSPUydrwi29KNLwFs0vF1hkpCwtAKqYotcMFgUDesex+KVZL9S6GtIO4tTn
 z5bXh6HpQoT0KK/rQUQM87uupI517rYBGjUUmJit5sE42YnqQ/9rfz+bmQ4fdGkXVMM/wBi
 llf3syXeoPwYcLsVNxUQQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:fWpGB/Cw+/8=:1nEVEwc9dYhOKmg5cexFkS
 aSms75fEI2exZRBqpQrx6UrwYuiQ1QElabH/alByxmO1SzJs1VKFokw32rH2Szp4rLWJHhG+b
 WLC21jI9vz7FI1CKwCMyrDBWrozUjzjvVfShRt/6Gmb47AMKKyQR88wU0YqiiH/EevQc/PpL1
 Tg47D0oiYy7zpDjgJttzq0W3wwj3ULRAiKOwlX56wtmTFv+2jPJpMOsBTu37av29/yIHNmIf2
 qjcgV/l1z0BiR/GPmiX/ALJLi5S9xXcwPfTnBYpMeCVlcMgTf7fdYgdGFBvAtNI8vFLIRiUNs
 SUxT+iBNlhIZmMIiszhTtrk3TdR79cedf89/20A5uMwhKv/mInz5k0DovHsi7cKdC8axNctGf
 9xurT1pwujv92BeVFhdP1yXYrVYiKHPcBKN24E3WJs5d2+HkOg2xLdLl/EsEyMo8tgNHwj3sS
 YOUZ+4/U7dTE8nBup/p5yvkPYYIOs3Ev/mQqAsOvVIVcBZhDweumyH18LycExsUo651HwEgtk
 ynBpfelZYLYr+UdSzOajDmIEKMGRP7PwTUX0quoRwCGjbFURG/kyMDMpmfHCbDE/5wnqqk8TR
 bGlM4CO4eHQB0Ponytjh3t8HXf///Ru31u7b0fx/MOWHKln6vyOHpGCFPNHUH3VU/r6/1Z3dx
 5Nnb1TKmSnOOU5QhYFzGf8bfKCcVccS7S+/2qveXjmcAZnCHo+tZuYbAtgaePT3XieP+/SSIL
 IcsKV8OHkxZpA/L3bi+SSOMZTXdN05WScdgTROAhLjso9St8hSt7OEAiIp2/Vo4bxd0wiqJ10
 ODl0eMtC7qtFsENu1Fx4vprZ5/sMk/OdiV6ICSo1W211fy3ZbW+DaA2W2Vi8Xyvpi+2ytNl2d
 RPcvfyc0frZvAMfNyOUG9Su/yjPZg78OdAKzAY0dNrFeCOZTtTOfc+mBJn8oiGt0yKpieIfPP
 NArLdMOn4K1Kekim8GnCq5M4Q8hoZ+jqSfGK4ZYL/xSFr6NwkbjW3cdbvhml2PSVBYxk1a26F
 K0ebOkJTtDAoXLxntC/wa3Hfgkf9F002OaU1pvkVJd5xR9rqFmwcP3YtzU+duroF0sCmSt5PL
 zl6O8jCJ1VhhNM=
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> To implement ^, I see no way other than special handling:
> when a regexp begins with ^, then after removing ^ from the regexp,
> call 'looking-at' at the beginning of the file name.

Just an idea: Seems that currently \= matches the position at the
beginning of the file names!  Could we maybe just guarantee and document
that?

If \= works reliably, we may also transform a leading \` in the regexp
into \=.  ^ is not so important in my eyes, it's easier to type than \`,
but the semantics of "beginning of line" is not as clear in this context
as "beginning of the object searched". If \= and \` would work, I would
be very happy.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 14 Feb 2022 13:00:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 14 08:00:07 2022
Received: from localhost ([127.0.0.1]:40154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJaxa-0006kn-U6
	for submit <at> debbugs.gnu.org; Mon, 14 Feb 2022 08:00:07 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4742)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1nJaxY-0006jT-3N
 for 14013 <at> debbugs.gnu.org; Mon, 14 Feb 2022 08:00:05 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1E60D10018C;
 Mon, 14 Feb 2022 07:59:58 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 83F3A10008C;
 Mon, 14 Feb 2022 07:59:56 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1644843596;
 bh=dHbFE6SJdimC/v63MkVC7A2oQNids84VI6Xb19nbmrY=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=hS6EgYhbcuFu+UVvXlf//oGEQpJ1sGMb6GbuKlZl2o7JX5kbNDgYD/hTuBItkr+q+
 qu4VMLvZ507gdpsSb5d1DC5OR/pI69bBFhmZQGnosFcYJYKQInfQmkiiG37wP07yg2
 eAD9Xl0xhwqegQ5AP+tH1Ef6N+Onj5xg7txkwYxjj1WxkMHwOcK14kj8OX6SXZ+oEl
 XUXOUoQHOyqC27fHgpxV4nOH5ftIlHCjJ/eHdwZ0N45KAOWlsZljI64KGLUxBelbkM
 DD+zc5EnOxVlGZ2Z7gkLXOB3ZPvwOrt6NVtiZORvcaIAeFI5B3HNbN00X5DlE/Y10T
 rJu8CFHcYjPeg==
Received: from pastel (unknown [45.72.237.157])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 421BB1203D6;
 Mon, 14 Feb 2022 07:59:56 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Message-ID: <jwvv8xhipdx.fsf-monnier+emacs@HIDDEN>
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
 <86r185520f.fsf@HIDDEN>
Date: Mon, 14 Feb 2022 07:59:54 -0500
In-Reply-To: <86r185520f.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 14 Feb 2022 09:41:04 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.045 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 14013
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> To implement ^, I see no way other than special handling:
> when a regexp begins with ^, then after removing ^ from the regexp,
> call 'looking-at' at the beginning of the file name.

I don't know if we want to handle ^ specially, but if we do we can use
something like:

    (while (string-match "\\^" RE i)
      (setq i (match-end 0))
      (if (not (subregexp-context-p RE (match-beginning 0)))
          ;; The ^ is inside a char-range or escaped or something.
          nil
        (setq RE (replace-match (concat "\\(?:"
                                        directory-listing-before-filename-regexp
                                        "\\)")
                                t t RE))))


-- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 14 Feb 2022 07:48:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 14 02:48:37 2022
Received: from localhost ([127.0.0.1]:39629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJW69-0003iN-Cc
	for submit <at> debbugs.gnu.org; Mon, 14 Feb 2022 02:48:37 -0500
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:39665)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nJW67-0003i5-20
 for 14013 <at> debbugs.gnu.org; Mon, 14 Feb 2022 02:48:36 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 161B1C0011;
 Mon, 14 Feb 2022 07:48:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN> <87o83ab67d.fsf@HIDDEN>
Date: Mon, 14 Feb 2022 09:41:04 +0200
In-Reply-To: <87o83ab67d.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 14
 Feb 2022 02:13:58 +0100")
Message-ID: <86r185520f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> Thanks.  I quickly tested your patch, and it seems to work well so far

Thanks for testing, this confirms that the proof of concept is viable,
so now the docstrings could be updated as well.

> (except for the ^ thing fo course).  Also highlighting worked.

To implement ^, I see no way other than special handling:
when a regexp begins with ^, then after removing ^ from the regexp,
call 'looking-at' at the beginning of the file name.

> Anything particular I should keep my eye on?

Please help to decide how search/replace should be implemented in WDired.
The current implementation filters out read-only parts of the Dired buffer.
Should the new search function also skip read-only parts or should it
match only on file names in WDired the same way as in Dired?

>>  (defun wdired-change-to-wdired-mode ()
>> @@ -238,8 +239,9 @@ wdired-change-to-wdired-mode
>>    (setq-local wdired--old-point (point))
>>    (wdired--set-permission-bounds)
>>    (setq-local query-replace-skip-read-only t)
>> -  (add-function :after-while (local 'isearch-filter-predicate)
>> -                #'wdired-isearch-filter-read-only)
>> +  (add-function :around (local 'isearch-search-fun-function)
>> +                #'dired-isearch-search-filenames)
>> +  (setq-local replace-re-search-function #'dired-isearch-search-filenames)
>
> And: Is it intended that this is unconditional (I would expect a
> `dired-isearch-filenames-mode' test)?

Currently it is unconditional when it's using isearch-filter-predicate.
So maybe it should be kept this way since it's what was used for many years?
Or is there a reason to change the current behavior?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 14 Feb 2022 01:14:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 13 20:14:18 2022
Received: from localhost ([127.0.0.1]:39235 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJPwY-00020U-Ic
	for submit <at> debbugs.gnu.org; Sun, 13 Feb 2022 20:14:18 -0500
Received: from mout.web.de ([212.227.17.11]:37323)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1nJPwT-000208-2L
 for 14013 <at> debbugs.gnu.org; Sun, 13 Feb 2022 20:14:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1644801242;
 bh=VvBe0JCoI6Y6wZ+uWecCHl99kk+RbEkVCtWQHSa0Frc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=ioj+vwwRxdsbdBEJzAx5ycPPBKwmqax1GSm3ZXOIQbO+a1eWYwuo8iLN31n1WZEg4
 +/flw1QOdjCLbTXxZDhqxVLvv3Yuk6Kogf34+NM/Oe1qL+CJQaI4Pf3EDm0dcqjae1
 JMGHeKvAdhqpBqHieA6aH6GdOtTJ0ofFblq+GYJs=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.212]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M1JEu-1nHlFD3T2o-002krE; Mon, 14
 Feb 2022 02:14:01 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
 <86zgmutwx9.fsf@HIDDEN>
Date: Mon, 14 Feb 2022 02:13:58 +0100
In-Reply-To: <86zgmutwx9.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 13 Feb 2022 20:59:30 +0200")
Message-ID: <87o83ab67d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:0fhZM6aESlbsz3KfVB+nfV8nZ/FlX4t9Q1DxW0K9pzw9OatTLzi
 IEc8psRHMgfNxwQrNOd6bDsJ1OmoyAQpUZAfMdy6NYO3TW1xI3kxndr8rTWEgZEpPE5hnds
 tnhTntXluiRzq52j+3HUTPqjBaIU7EtMz+uVBxwXRVsXbGCa+L2DZRwdTLf41HesaojMg1d
 hqxsDSnCDZmRrIds9yWTQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:JBqwCvGVPFM=:Yi8iDApHRHA9BmCxDUk12q
 xWM+/pxPMIYHTK29QQa/ZZembX/152ybxtuNeEIWkPYou8SNNVUfl6bScoG7XBoahfSF9+akU
 3VNqXtoHlcINGJTP8j+/7fsR5aVEVMcuMiaui/i1XVfye7Rgl83TH0WKYVY9aMaoLV9OyL2C5
 SimmMsUAo0mOir69CH/iY2vKYYQdwUgUk8DOdscU1o0JX2sG+KfBrZvLjrQkFLxVQoSRo9f58
 SzbGwK6X3m9hZ79QoFl0r3XHFDNJNMMmubP8mltd5dDMOKfrqliMvlwKOrvavZ34GE9bRdXi5
 /8ttHi02hTd5Ivwxj0uWr9ceXeULg47sh9SLyX8xnfmK1aA88d+6uq4SHrq+1gKaYMNKcOE/D
 Q0f+FnOE73QhoY6ujKnIJz32nxGIf7HhIxfGkBDfJdIYDTUKuzpgMU0+R4EJtyLlZwRr+b8Es
 iTQc7xeBMk6OjDzrFdkoqgmQVPiD2LshOSKku2rOgHxD3iXbJl58uR+xW5/G01pmYWKKb0dOv
 PUvuQYbZmYF+ZXUuZxgJgnN4vdstTblnUBF8OCe+3U+f9BQ1ZQMMsE9rDOODPankir5ISnjtC
 SstfRdAHZLaOtrEE0WBBmwLHiXwofo7HJGXvsgcckQ5lQx9fo40Qs33BQneU2iiGY1RtkkBf5
 AmuGyh1RDHME565PHSeYPIYmPfUJZjXGEgrnfMc7i5EOilFAKJpFXe5Q1HcvVK2PuwnFOhih1
 0c9NSew7bZfCOw6MkzCTr2YnnyZPIfZr1xTG+HL6n4u2auNtQHMIxrOAS3ud4U75W0scpbdVn
 f1SzapVKbJhxEJkIAPtOqXsbYNZA4JZ+SmyZ44cN0X9LUbxqJA7mJgRd663sTG+Va5suHHjWM
 h1Wtgdl5YPNq77tOF4HxgRzLOafTKa/fFhJe6Zlv5XPEpqEy+ScmimVM23A79Fmt6P9Klcjpx
 xXlwnwPPt1VzWzNWo288u+LDrlKIzCyAZWzYzwIHfJPtldq+XiE7rz9/0gv6EsbuTrCmppVm7
 wuxhMDo2mAYxU3CwusAJGkzd8oKCIEWSywaCA3yFwS54fBG7piNFn+ZcgCaMgxaQ7pz0H8zcs
 bnkWGwHEzoA3S8=
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> After a short delay, this has been implemented now:

Thanks.  I quickly tested your patch, and it seems to work well so far
(except for the ^ thing fo course).  Also highlighting worked.  Anything
particular I should keep my eye on?

I only noticed that if we keep the patch, the docstrings of the touched
functions seem to need and update.

>  (defun wdired-change-to-wdired-mode ()
> @@ -238,8 +239,9 @@ wdired-change-to-wdired-mode
>    (setq-local wdired--old-point (point))
>    (wdired--set-permission-bounds)
>    (setq-local query-replace-skip-read-only t)
> -  (add-function :after-while (local 'isearch-filter-predicate)
> -                #'wdired-isearch-filter-read-only)
> +  (add-function :around (local 'isearch-search-fun-function)
> +                #'dired-isearch-search-filenames)
> +  (setq-local replace-re-search-function #'dired-isearch-search-filenames)

And: Is it intended that this is unconditional (I would expect a
`dired-isearch-filenames-mode' test)?

Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 13 Feb 2022 19:09:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 13 14:09:38 2022
Received: from localhost ([127.0.0.1]:38891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJKFe-0007V1-8U
	for submit <at> debbugs.gnu.org; Sun, 13 Feb 2022 14:09:38 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:55645)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nJKFc-0007Un-9a
 for 14013 <at> debbugs.gnu.org; Sun, 13 Feb 2022 14:09:37 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 078BA4000C;
 Sun, 13 Feb 2022 19:09:28 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
 <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
Date: Sun, 13 Feb 2022 20:59:30 +0200
In-Reply-To: <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 21 Mar 2013 21:59:52 -0400")
Message-ID: <86zgmutwx9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

--=-=-=
Content-Type: text/plain

> Why not (add-function :around (local isearch-search-fun-function)
>                       #'dired--isearch-filenames)
> and then
>
>    (defun dired--isearch-filenames (iiff &rest args)
>      (let ((fun (apply iiff args)))
>        (lambda (&rest args)
>          (unless (get-text-property (point) 'dired-filename)
>            (if isearch-forward
>    	       (goto-char (or (next-single-property-change
>                                (point) 'dired-filename)
>                               (point-max)))
>              (goto-char (or (previous-single-property-change
>                             (point) 'dired-filename)
>                         (point-min)))))
>          (apply fun args))))

After a short delay, this has been implemented now:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=dired-isearch-search-filenames.patch

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 41c45b4e51..f1d0f9e225 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3140,11 +3140,11 @@ dired-isearch-filenames-mode
 When off, it uses the original predicate."
   :lighter nil
   (if dired-isearch-filenames-mode
-      (add-function :before-while (local 'isearch-filter-predicate)
-                    #'dired-isearch-filter-filenames
+      (add-function :around (local 'isearch-search-fun-function)
+                    #'dired-isearch-search-filenames
                     '((isearch-message-prefix . "filename ")))
-    (remove-function (local 'isearch-filter-predicate)
-                     #'dired-isearch-filter-filenames))
+    (remove-function (local 'isearch-search-fun-function)
+                     #'dired-isearch-search-filenames))
   (when isearch-mode
     (setq isearch-success t isearch-adjusted t)
     (isearch-update)))
@@ -3168,12 +3168,34 @@ dired-isearch-filenames-end
   (unless isearch-suspended
     (kill-local-variable 'dired-isearch-filenames)))
 
-(defun dired-isearch-filter-filenames (beg end)
+(defun dired-isearch-search-filenames (orig-fun)
   "Test whether some part of the current search match is inside a file name.
 This function returns non-nil if some part of the text between BEG and END
 is part of a file name (i.e., has the text property `dired-filename')."
-  (text-property-not-all (min beg end) (max beg end)
-			 'dired-filename nil))
+  (let ((search-fun (funcall orig-fun)))
+    (lambda (string &optional bound noerror count)
+      (let ((beg (and (get-text-property (point) 'dired-filename) (point)))
+            end found)
+        (unless beg
+          (setq beg (if isearch-forward
+                        (next-single-property-change (point) 'dired-filename)
+                      (previous-single-property-change (point) 'dired-filename)))
+          (when beg (goto-char beg)))
+        (while (and beg (not found))
+          (setq end (if isearch-forward
+                        (next-single-property-change beg 'dired-filename)
+                      (previous-single-property-change beg 'dired-filename)))
+          (setq found (funcall search-fun string
+                               (if isearch-forward
+                                   (min (or bound (point-max)) end)
+                                 (max (or bound (point-max)) end))
+                               noerror count))
+          (unless found
+            (setq beg (if isearch-forward
+                          (next-single-property-change end 'dired-filename)
+                        (previous-single-property-change end 'dired-filename)))
+            (when beg (goto-char beg))))
+        found))))
 
 ;;;###autoload
 (defun dired-isearch-filenames ()
diff --git a/lisp/wdired.el b/lisp/wdired.el
index ab3b91bbe5..573e125bc8 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -217,6 +217,7 @@ wdired-mode
   (error "This mode can be enabled only by `wdired-change-to-wdired-mode'"))
 (put 'wdired-mode 'mode-class 'special)
 
+(autoload 'dired-isearch-search-filenames "dired-aux")
 
 ;;;###autoload
 (defun wdired-change-to-wdired-mode ()
@@ -238,8 +239,9 @@ wdired-change-to-wdired-mode
   (setq-local wdired--old-point (point))
   (wdired--set-permission-bounds)
   (setq-local query-replace-skip-read-only t)
-  (add-function :after-while (local 'isearch-filter-predicate)
-                #'wdired-isearch-filter-read-only)
+  (add-function :around (local 'isearch-search-fun-function)
+                #'dired-isearch-search-filenames)
+  (setq-local replace-re-search-function #'dired-isearch-search-filenames)
   (use-local-map wdired-mode-map)
   (force-mode-line-update)
   (setq buffer-read-only nil)
@@ -438,8 +440,9 @@ wdired-change-to-dired-mode
     (remove-text-properties
      (point-min) (point-max)
      '(front-sticky nil rear-nonsticky nil read-only nil keymap nil)))
-  (remove-function (local 'isearch-filter-predicate)
-                   #'wdired-isearch-filter-read-only)
+  (remove-function (local 'isearch-search-fun-function)
+                   #'dired-isearch-search-filenames)
+  (kill-local-variable 'replace-re-search-function)
   (use-local-map dired-mode-map)
   (force-mode-line-update)
   (setq buffer-read-only t)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.
Forcibly Merged 14013 29215. Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 8 Feb 2022 19:36:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 08 14:36:27 2022
Received: from localhost ([127.0.0.1]:48713 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nHWHr-0007ZT-6t
	for submit <at> debbugs.gnu.org; Tue, 08 Feb 2022 14:36:27 -0500
Received: from relay11.mail.gandi.net ([217.70.178.231]:56289)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1nHWHo-0007Z9-Ox; Tue, 08 Feb 2022 14:36:25 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id C482E100003;
 Tue,  8 Feb 2022 19:36:16 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
Date: Tue, 08 Feb 2022 21:32:44 +0200
In-Reply-To: <87tuo123ru.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 20
 Apr 2021 02:33:41 +0200")
Message-ID: <86h799jgrn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

forcemerge 14013 29215
thanks

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
>> Right, thanks.  Now I'm beginning to understand how this code works.
>
> BTW, one (related) thing that I found problematic over the time: I like
> to use query-replace on file names in WDired.  There is no way to match
> the beginning of the file name - right?  That's sometimes a problem.  In
> this situation it is even better to use dired-isearch-filenames -> nil
> because then I can match the space character before the beginning of the
> file name.

Like was discussed in bug#53758, xref uses ".*" to replace in results
where search/replace should be performed only within boundaries of matches.
xref uses own search function:

         (replace-re-search-function
          (lambda (from &optional _bound noerror)
            (let (found pair)
              (while (and (not found) pairs)
                (setq pair (pop pairs)
                      current-beg (car pair)
                      current-end (cdr pair))
                (goto-char current-beg)
                (when (re-search-forward from current-end noerror)
                  (setq found t)))
              found)))

So maybe Dired/WDired could use a similar function.

But in any case it seems matching at the beginning of the file name with "^"
as also requested by Drew in bug#29215 (merged) is still impossible.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 23 Apr 2021 16:53:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 23 12:53:23 2021
Received: from localhost ([127.0.0.1]:38693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZz3T-0002Cr-6X
	for submit <at> debbugs.gnu.org; Fri, 23 Apr 2021 12:53:23 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:48193)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lZz3Q-0002Cc-Jm
 for 14013 <at> debbugs.gnu.org; Fri, 23 Apr 2021 12:53:21 -0400
Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166])
 (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0715210000B;
 Fri, 23 Apr 2021 16:53:12 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
 <87eef4ep75.fsf@HIDDEN> <87k0ov9nj7.fsf@HIDDEN>
 <87v98em2ff.fsf@HIDDEN> <87r1j1hqes.fsf@HIDDEN>
 <87mttphpvl.fsf@HIDDEN>
Date: Fri, 23 Apr 2021 19:52:51 +0300
In-Reply-To: <87mttphpvl.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 23
 Apr 2021 01:16:14 +0200")
Message-ID: <8735vhgcyk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

>>   4dbc44550d * lisp/wdired.el: Apply text properties lazily
>>
>> could be related, especially because the error seems to happen only
>> once per file line.
>
> Wrapping the body of `wdired--before-change-fn' into `save-match-data'
> seems to fix that problem.  Would that be an appropriate fix?

Thanks for the fix.  Now installed to master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Apr 2021 23:16:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 19:16:25 2021
Received: from localhost ([127.0.0.1]:35797 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZiYa-00034e-Vp
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 19:16:25 -0400
Received: from mout.web.de ([217.72.192.78]:47097)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1lZiYZ-00034O-2N
 for 14013 <at> debbugs.gnu.org; Thu, 22 Apr 2021 19:16:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1619133375;
 bh=dUr2jgMwsCbh4fvVHGLBhqkzF42jM3km5lEUeH/zk5c=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=U3VRlv9ZzVoVPedxnIt424m5uek+czs1vyQRjlOt65KZ1zDs3TFTivCb+vXrtsFJ8
 TzoQ6cBTc1lw0Q4AV+7eVLIc7zpgb+jFCaH1V2FLqRGOwOXX29gb11ErLQAPcEb3pI
 2/q7UF/B9eQZgdkEPBzSo769t7dLwgldFLyhCdfo=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.96.191]) by smtp.web.de (mrweb102
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MeSKR-1lypwO0zYl-00QAY2; Fri, 23
 Apr 2021 01:16:15 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
 <87eef4ep75.fsf@HIDDEN> <87k0ov9nj7.fsf@HIDDEN>
 <87v98em2ff.fsf@HIDDEN> <87r1j1hqes.fsf@HIDDEN>
Date: Fri, 23 Apr 2021 01:16:14 +0200
In-Reply-To: <87r1j1hqes.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 23
 Apr 2021 01:04:43 +0200")
Message-ID: <87mttphpvl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:TQ0mzDMV/P5JzjhX7zHH/s9GTiosr19bNlv87PnAi2/kF3YKIVA
 7yCdSck6BBWfxvwOdqDzOWqrM2t3E7OGvAk6bILr2SeJ8oUFTxsw8nPOsZd6E9Olzyf5DA0
 nhJfZxP/2cmgEH024GHhC6v5/chCmkSiPi7my9OUWtxNnhm+9J+NZqPfY3RBkiQZEpnP3bw
 vLpNB2okE5rh0ZgQ4Ow5w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:bPKiFX4S7No=:3HxJBeHFPslWlc/0v0JH6Y
 mlwJOSFI71x5m4zKoxrPfuv1EMbhzBi+SFd0WCAMVosAu5T48hVrMlvJXNFQ5CroFNlywKbRC
 6X3yZGdXM1My3i3iWx3DHOb6OcWMz+ToRuYMsgSekdaY6yPpuHyIWCikaFPnPROSYMn+i1AWk
 tuaQhPxrveXieHfgQLgafkyvJnPe7IQKGHEprr9m7T3Jyhx60nCQ6F8jlFSXTunhj/bWU2HH8
 S0mMjUeUYOaJ6B6ZoDjpU9trWaA/VRGCWSH3lH4MH9rPFeH5jC/3TLy3CaMhMf/TR8Wzi04Sn
 yj0PETdjHUpHwwsJNSINEPZ051qpixvXf/yLOwkbFc4ybCk6zmGeVk6A5hIBAJd995s8OBDe2
 0XUl+6Ua9LnIc0qWGnt2LBgwAF3QtG0IaT0tN6M6Z26jfkJ2ENPBnLYqrETAuoR/EmaCVLB1Y
 ZnJ8ZUm2HB1Hu1XOjEVBpc6ltE5Rq04zsgW/2rwsts9V/o2wsIzuy8JTcPKu0wInEp1TAfTI3
 BRmKFJESu8uznwvSp/seCr4sOxzIHIi5SBNo02QYTiiF/5EopiQNCKnGwC3ol42jXaZmpV9pw
 y8JPOujn3GHH7xFfFf7eZHzcrv46abEA85RPbkqLyugTUMDFTMMgB2VfQC9qisBct2oujf328
 sMwQxrCqpJ+lOELQlrGSuwBVMt/bqswCCjU7NB4ipK1WzDm4k7hXk3gv+JDrLihLUgK+fWLmt
 4xnUtBDQGFWkbX+qp09ZfmeuNloY8sa6+M42KyJzoXDvKAnlZRXieR9DK7nUiOaLPsxkh4G9O
 TylTlbZV4nkq2znvCuCwfiq+E3vS1nu3N5qeolj/j57yhjJ5OgYwViwuAiAmVwI89qMqeUgje
 2TDhJoAYFni8PmZ6ziN7hSFpS0cdrL2VlgK9riY2gnQ5e6feUV9WYQb0tICefa+Ei78CfV2AL
 6QWKYYRSkYLaMT+MtvBlFMr9VPVnKBWX3cJStfCM/mRLdOCmOQg5+PzYtXt/SrmxECWW7XAI5
 fZfvAri5kBC0jMKEFzMYVc4oguytb7JO5MIW/YFqZaeJ4Hlj9X8rbyR+jD+KQ21RlSYJskT6q
 637l15d9/lJzh/WJjyTWIH9au2F+zN8BW43Kc61iIO63FT11NNFj2lG7DRaoOqriFcM/GZd+T
 t4C51kZak25e5bSXfKMgVMX1JH50C63N6aEnQ895g35d+OSErhNWQd5wmVUjXjcf3XY79OwZK
 Hm0vX0Kf/YYORPwlx
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> I guess
>
>   4dbc44550d * lisp/wdired.el: Apply text properties lazily
>
> could be related, especially because the error seems to happen only
> once per file line.

Wrapping the body of `wdired--before-change-fn' into `save-match-data'
seems to fix that problem.  Would that be an appropriate fix?

Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Apr 2021 23:04:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 19:04:54 2021
Received: from localhost ([127.0.0.1]:35782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZiNS-0002nE-KA
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 19:04:54 -0400
Received: from mout.web.de ([212.227.15.3]:34223)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1lZiNP-0002mx-0F
 for 14013 <at> debbugs.gnu.org; Thu, 22 Apr 2021 19:04:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1619132684;
 bh=3yUpuG2qeu8M/XM8ZyiAsnZdc2gzreP6X6ipes5W8HU=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=l3sqAZzquDUTm15j6q0BLMQNMHb/gvc9IgUrU8obQ7Awp05hVsM/QWoP9muCagxBa
 ynR6p3V1KUrsNoxop1zvfIpyY75BgRxAH6aZsZxHpfviT3Tc7kmrGz8QSfzWh8ckAH
 i1xCA1aI5FZmy3R0jE09AUoznZnvW7wNzfu95dTM=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.96.191]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N9cHJ-1lWx570MVR-015N6G; Fri, 23
 Apr 2021 01:04:44 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
 <87eef4ep75.fsf@HIDDEN> <87k0ov9nj7.fsf@HIDDEN>
 <87v98em2ff.fsf@HIDDEN>
Date: Fri, 23 Apr 2021 01:04:43 +0200
In-Reply-To: <87v98em2ff.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 23 Apr 2021 00:51:32 +0300")
Message-ID: <87r1j1hqes.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:0u+QlM9dpUUy7nbXxQA2QPdhnn+h3bnY6TEXxC9QQmLsQ4TtbuW
 7S3U+BKlyjjqGOVHxzX+GBR8ptt0L2eiIXVfiD4USLTkL3/5JcwDIgXW+DBF/6e9W5oapoY
 bVGjQomGut7swWdJIekhNTr9gzkfqdX7h93Q1j/U4l3820FA7zq9shtof2Su+Q2F2sTV5TJ
 jzX8jfVwZ1gammdmsiTzg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:cof/YZLfRek=:Gw01+R0UxxrMmxBvWHdjta
 bFGJIF5xwvqgU/vXHi32fVWJRtngS8BlPrwutj6IxlIlT5rUiGe3ltYGzu6Cv2Zg8GugIsp3y
 BMya1Hm0OnDUeDnrGESx5S8Je5uYN37p+b3mwrhAUAEMW9ZM2COg1wYRx3OkbAaxNu//Ar42q
 Jp3pzUCWssu9V56p0u9Slu0FG4R4WFss0GiLuggoj5XOhhHMW8c0AZTrdLW5Hbe3PXUaKXX9n
 SNMWNZbLbLU6e3SdcEO64U+2NGScOvugbIxfjxdeED9O9lKAofEdLPYuY7VumZIAPfoi292Lk
 JEqXXYiDA3dfZHAWOLYMY9k/oPrgWWMGYqxTfcVKkp3H18WqP41V1PdMTyTEZzrTAsdSdUR/K
 23n0MF4fNuMMuAOjBBNM6ZR9sD6uHfXZI2aQKlue2gBCFx+0TbbQqX/NG1bx8xTmnDe6z1LvD
 Wq3WBrVZBMN5kSOhZhtyI+gX6a3VhNkjG1hi20wkFuzu7WfPk5fzpa3TxD5DB9O2donDI6SCM
 kH8mDzjPZtuUPv9m7KgD2YCVpxArgVqnyqK30Uwd7A1vsWJ0YqtK014Ht6DKhQK4ovTbti0BR
 ZJcL3/+5+5KV9XeP8+E2zpqF0bnUQnjITCVOks5iG80USJaFHBEn2EeyNwhr7+cnUjxG+Os/0
 +nqWfpGfBBXyZXdCe1e+QYyXLf4F7Z6QU7v2/UDIwCqNYbkCBrHEzC638AGJOKd/lHw4NazRP
 /fYUrYtyo1zrJxp42CXLFvWKGLm59q8PUWW7d5To7yHK6jslg+av9Po369nmBmSQmnPhcdcty
 ijEopq9J08NYXawoLyENjXq2ZjpIicWrYNBUAQzcqWul+wVi4UsgB8v3xCZlGEBbFz9MreiOL
 kF3TRl9jZBi9zTzSU2udeT8Vtm/yREMOqy5+MKwBsxuTkXuQvU3ylXCGGoTz8BdNuD/J7LBwz
 Yl39qLhDmOXKrIXw9F/INGS+W4OXdRt4oLP0/+7mo8Zc/eBv8WP8sXgJj2SeJd5C9jVMDdS7G
 AzP6Xv1qEbC5lYFzm//V8uPy0H5YnWnuBFkds1vspIe3CC7umKw4FZ2oOIgf/ddiESvteJqMq
 W6z22CNrdoSj/r1Xnq/djvDjwngKdj+6yOsmQwqIX44zu7vlj5GzAJUmUaR+7kAoG1ykXOU8O
 uJ7Q3fQJgVVSTmR/uDObyrD/u6hopO7RXI5fOLCj9wLy2k2XfN0TgqPb7VfLVRR/NQMdTrcYi
 NMhoHbRMCpWoLzK9F
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> This is something new, maybe caused by some recent changes.  But I
> can't find anything suspicious in the commit history of replace.el.

Yes, I see it too indeed.

I guess

  4dbc44550d * lisp/wdired.el: Apply text properties lazily

could be related, especially because the error seems to happen only once
per file line.


Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Apr 2021 22:18:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 18:18:09 2021
Received: from localhost ([127.0.0.1]:35765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZheC-0001jX-QJ
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 18:18:09 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:53220)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1lZheA-0001j1-3V
 for 14013 <at> debbugs.gnu.org; Thu, 22 Apr 2021 18:18:07 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13MM97PB063277;
 Thu, 22 Apr 2021 22:17:56 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2020-01-29;
 bh=irF0awxACKANSQK0WDDLL2YSTvEWCyosqAprDbvG9Ps=;
 b=gp+SdFHPcjON1XeR3cD2qwfQv3oQpB3LPVFBGZzI2uuy/HKsqlK3ytErutFmiLCqk5UW
 6GUX0hJBZbSX92C6YYxwKoETBGlmFFYaAh+qd3A+hI3zarcyCiap07gKh7peKpqpLUzT
 8FBC6WZUB44Zi0xO8h0YTy32w7J9Md9cDwfm4RBxxSJZPUMBAdH5qmBfIYc/lqyuaNQK
 PDqdo4ORPqoXKE3h7sfAm91j+oqL/+CDhbJtgKhdSNz3PfnSPzTBte0g1BDdJumXTNUH
 0w4U965LVp5TQI0PaipK35x+J8ppBxuKyIB/czSiqLCdDFnkzgmMBwU2dt4g81mBmh4h aA== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by userp2120.oracle.com with ESMTP id 38022y66j4-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 22 Apr 2021 22:17:56 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13MM9sc8021420;
 Thu, 22 Apr 2021 22:17:55 GMT
Received: from nam02-cy1-obe.outbound.protection.outlook.com
 (mail-cys01nam02lp2054.outbound.protection.outlook.com [104.47.37.54])
 by aserp3030.oracle.com with ESMTP id 383ccex5b0-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 22 Apr 2021 22:17:55 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=GZPR7ZgoF2tNx65MpVffoRDsD2Q8A1oTB3cYKFwYuwYpOG6gfilck6PDVIL0HvrhpYWEXmqbfB65O2z0pin4WMbK1Lt75yAKIFjMZll6Ye2rPJt8p4Lj61HSSu9pM9mNZ/w3dqK3I02gbEVnJvd1UELsziVzaUKQ6WuR9EHw720rP66vprVu1U3jk3ER3jcRKlftznqNmp3WnAVIY/3NcBul0tiKO9LMEcE6HPQXZCUktgnyKg6fds54AkOOtISQB1Au2J1WLNoYc8/Di4EYXRN3+F3DaE2PGv7F8kNocOXfdcx8qjmT/aMLd8X0jDBtRTg9cb5rOOt1tpD90QbAsw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=irF0awxACKANSQK0WDDLL2YSTvEWCyosqAprDbvG9Ps=;
 b=keGkU/PZfM2jQpt7l0fo89Z/6OMq8tkCnw7gzoX1UVALJqOJD1OfcGpWI1kRNE0RxQmWXycJ9IXlMLqw+oPqRFTSFVu58a6XYNc/VwgyAclohA/dQI8mBzBKWuMDGlKssFF+g6zeqjaV01Q2ICkVtQJFPvyytGldT2lOp3axoYoHNjgphhGtAf5MG+wYiiVgBjLSMHQlpGyLhtFJFlrVlvJts1mdyZePNc7At9Ubc2OCE3C0QO6h9R/nF+b0EQhEY6jIYbRYAwLeO7Aj0y0D4/2hqB69DkGYbeSAZ45a2mekOuTrkxoi9mRV4Yj4FXUOLS2WSnYNIzFgZ3WtbL6vDA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=irF0awxACKANSQK0WDDLL2YSTvEWCyosqAprDbvG9Ps=;
 b=YuCDJ7x4EGK2M3nW8af6jtTHf7++QcDLRN1gLVm3N3xvjl4F2LkHKoU+2ILVJGBgG4AbkXx1tC7br0Zx7+o6FaMa9cGLjmy73Wy+bqr3t+okuiXS1h7AU+uN4VcPweg93O64XO0qBjZ4C0i9t9wQK2xs9tQTZ/7TLaw2dBbkKjQ=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SA2PR10MB4490.namprd10.prod.outlook.com (2603:10b6:806:f9::24)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 22 Apr
 2021 22:17:54 +0000
Received: from SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4065.021; Thu, 22 Apr 2021
 22:17:54 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: RE: [External] : bug#14013: 24.3.50; dired-isearch-filenames-regexp
 is matching text outside filenames
Thread-Topic: [External] : bug#14013: 24.3.50; dired-isearch-filenames-regexp
 is matching text outside filenames
Thread-Index: AQHXN8Go2saAFCoet06KSpzhRcy0u6rBGh2g
Date: Thu, 22 Apr 2021 22:17:54 +0000
Message-ID: <SA2PR10MB4474DBBF01DABCD03B39C420F3469@HIDDEN>
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
 <87eef4ep75.fsf@HIDDEN> <87k0ov9nj7.fsf@HIDDEN>
 <87v98em2ff.fsf@HIDDEN>
In-Reply-To: <87v98em2ff.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: jurta.org; dkim=none (message not signed)
 header.d=none;jurta.org; dmarc=none action=none header.from=oracle.com;
x-originating-ip: [73.170.83.28]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 25025442-2a81-4aaa-9b99-08d905dc79af
x-ms-traffictypediagnostic: SA2PR10MB4490:
x-microsoft-antispam-prvs: <SA2PR10MB44908FE2DC2AAA265A13B7C0F3469@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:1169;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: n00ZENfV258VSmDjq53ypd9aJE9aMicqQ7IO0T70LsI1n+YzrdYDauB+Znw/QJArnNYZnKdJhxA3GyhAU1gejghN0mpTGi+38PS6p907ShhPL9MWLAuR1jyquzSdBgomUes7xRXpXFm5dSePX+r7dZT5MTA58yYwAH5v2OcMg8Ss+5yub7iPWKGjPP8G2ZKsgLi/nv8Qg2L1TTinWiLdRUQ6BUXjczcgQ9zRKYL77fgOWd2D3ByxFdGq4/aPXNEYa9u2FlQ/RPQPG22jRVeJID8MclCHmFKfAEnEECnX7R/zGh1vEHpXAUCP9hkxojNh5xUC6ZZXY8ZkX2mD8F/ue4X1+MS3sbn79u8qeiAwqRGhjwsmjumCHB/HfL30xGMNjmuN2NNTVeBLBN5Ox4i+0vQCRKAk1DbMYl0p7EAaPWES5fWzM+QUPH+e0sCmmlfqgYY0niZbpiiABt491VE0CwS8YFnuSkYvDNBOw6E5tYmk6gT8eM8dGQ6ksM9T3lUUkJLksU8L3aeNx/EWmJUJCEz8XkANOlfFo3WsjMegLgc3a6zy5BVHa6O3Z8/Ppt4JhxhP8u6pNnvA/Dmn03s1roaDNh1SxXSxeRhweHTLSWo=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(366004)(136003)(376002)(346002)(396003)(39860400002)(66446008)(186003)(86362001)(52536014)(316002)(26005)(5660300002)(71200400001)(33656002)(66556008)(66476007)(2906002)(4744005)(64756008)(44832011)(38100700002)(122000001)(7696005)(83380400001)(6506007)(76116006)(66946007)(55016002)(9686003)(4326008)(8936002)(110136005)(8676002)(478600001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?5A66JgSvusQNEw7MdtsjII6P79B/eEi0Yz4X9loZ245p2lVjXg+9NLyNish0?=
 =?us-ascii?Q?C/SLslIYhcnjs9+P/L6fvxRn0ts1avPmi5RaV1Ut/nC+mCpXRfmpBNgpLToN?=
 =?us-ascii?Q?L4T6i9z4IeynIC2Ju7KV8wrzBR4vtScMP7Udir720nUHkZFUFHSwMWYa1qFu?=
 =?us-ascii?Q?OU2MkEcB1TQdwrJduZ7z6whKJVoSPNT5leEzT02s7kMh8EXH9JkFLH3yual1?=
 =?us-ascii?Q?jS/v7KLlMSjc+6vbWMp7Vm+Ei9rcWWinr+REKPQEDEoKvBIMhDi2jpRrg+cF?=
 =?us-ascii?Q?NVAs2+CEwBM3ploo5OeGp/+b0YIhm19uQxYAseUT8yI2jwNQ0FzF18HE0dRi?=
 =?us-ascii?Q?kx1AhA3uQtaznW/hR4uvLjh4aic2y/WZJZ6tIwcZE9z71iQgEH9I05FK3uGd?=
 =?us-ascii?Q?9rYx56CWnVQ+SvrDDdeeygyljStCJbZKiXhTbhWJV7B0Qf8rMI/v89exPfjd?=
 =?us-ascii?Q?Bv5KOzrQR8C93ILl07neDI4OBwnLZXEfZu3B2vBEgaOecgwOOSuEOgCgtrJy?=
 =?us-ascii?Q?zVYJxCUOlkDzEP3ttd4ROuneIEfEPT/YNr7MtdWWU8PbRNEq717CBuvYcaez?=
 =?us-ascii?Q?mF6J/K0+y6UHv+HznatGb6uSU/Cv8UryX98PkQgqBhjJFJfcnOp5yVn9y71E?=
 =?us-ascii?Q?l9kIFjx6sPGE40m6h4GDRXQ74A8H5Fjx4Og0sVRxzLUYsPgax9xDhg/xVwTY?=
 =?us-ascii?Q?sEJmrqgDGNAx2pfH0O9DLRK2REtmt14nt560ETff6Lcr+9ZCje9wMt3zDFMX?=
 =?us-ascii?Q?h9GVMAjXtU4jU10/ViWftUAyAGkhF7bxaSr7SY3IgM9VDvKoFQtSNlTVsgwJ?=
 =?us-ascii?Q?tBqmdPRR/sb1RgkP3UvR1SzW4AGx78TZZQ4RWkeHWnNVqNhQGebrgsbZIaH7?=
 =?us-ascii?Q?0Lzl0LLHwJp+soKaMqx9sT7pTJF3OVmdn3xcsSsGkJlIofR/BVAbbGie+whA?=
 =?us-ascii?Q?QeCDYdAlYNvCDnIkKsykLcxVE//mSYF5kEWVsVkLfJxO7p/wb8IaoBwRE9p8?=
 =?us-ascii?Q?I7fCU8sWzX80kMruh0L0SFn5FPSMGPtfvKSf1QMaoKJIMunjSByU/f81Yucd?=
 =?us-ascii?Q?OJ0RYMQmOnjUIBKnXiF4BlD8qrDErRYGITY5edae/q8iapmm0oc0TU4Iq9IV?=
 =?us-ascii?Q?aPd13CYsIBjOcAHVNDDezVSGDOLsTMBn33R1RDs/LhI00BZZMLIVP6f+ohVk?=
 =?us-ascii?Q?4lCJGvMP5nxxHKpyapF4vgFkxuxIv4oM90Q4c3AWUoZGEVwOqEBAHKTKm4od?=
 =?us-ascii?Q?9rs6zXZEGELcP5uwnIdFK9rpiWYHRihC5NNLeU6n33LtOcQHCv6FmxPKCzPo?=
 =?us-ascii?Q?B3nX1QBTVhH0K/MmYpZUi6u1?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 25025442-2a81-4aaa-9b99-08d905dc79af
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2021 22:17:54.0996 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: FFeyjEoTuv/F/Uq53Jdt+5TEZohaW/UHH5CkHM3Xinfm1fZF/ntxuIrLA4IhDsIuxkBzQ01WzgeM7pgNHu10Dg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4490
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9962
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 spamscore=0 suspectscore=0
 mlxscore=0 phishscore=0 malwarescore=0 adultscore=0 mlxlogscore=999
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000
 definitions=main-2104220161
X-Proofpoint-ORIG-GUID: iGFVECRw3lnp3p0-r-VNzRolvfgzfNAr
X-Proofpoint-GUID: iGFVECRw3lnp3p0-r-VNzRolvfgzfNAr
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9962
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 lowpriorityscore=0
 spamscore=0 bulkscore=0 phishscore=0 clxscore=1011 impostorscore=0
 mlxlogscore=999 adultscore=0 malwarescore=0 mlxscore=0 suspectscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000
 definitions=main-2104220161
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 14013
Cc: "14013 <at> debbugs.gnu.org" <14013 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> when I tried to perform query-replace in Wdired,
> it fails with the error:
>=20
> Debugger entered--Lisp error: (error "Match data clobbered by buffer
> modification hooks")
>   replace-match("to" nil t)...
>=20
> This is something new, maybe caused by some recent changes.
> But I can't find anything suspicious in the commit history of
> replace.el.
>=20
> Do you see the same error?

I think that's maybe something new.  I don't see that,
with, e.g., Emacs 26.3.

I do see the problem of not being able to use a regexp
that matches beginning of file name, for query replace.

That problem is from isearch filtering.  I see that
same problem when, say, limiting query replacing to a
rectangle that contains just file names (or file names
plus spaces before them).  That's entirely understandable.=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Apr 2021 22:09:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 18:09:59 2021
Received: from localhost ([127.0.0.1]:35743 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZhWI-0001WG-J0
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 18:09:58 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:57611)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lZhWF-0001Vy-5u
 for 14013 <at> debbugs.gnu.org; Thu, 22 Apr 2021 18:09:56 -0400
Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166])
 (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id 36A38240002;
 Thu, 22 Apr 2021 22:09:47 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
 <87eef4ep75.fsf@HIDDEN> <87k0ov9nj7.fsf@HIDDEN>
Date: Fri, 23 Apr 2021 00:51:32 +0300
In-Reply-To: <87k0ov9nj7.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 22
 Apr 2021 02:21:48 +0200")
Message-ID: <87v98em2ff.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hi Michael,

> Do you ask me?

Yes.

> I had hoped we somehow find a better solution for the whole complex (of
> searching and replacing file names in Dired/WDired).  I don't object to
> give such a hint, but I don't find the approach very... aesthetic.

I intended to continue searching for a better solution,
but when I tried to perform query-replace in Wdired,
it fails with the error:

Debugger entered--Lisp error: (error "Match data clobbered by buffer modification hooks")
  replace-match("to" nil t)
  replace-match-maybe-edit("to" nil t nil (883 890 #<buffer test>) nil)
  perform-replace(#("from" 0 7 (isearch-case-fold-search t isearch-regexp-function nil)) "to" t nil nil nil nil nil nil nil nil)
  query-replace(#("from" 0 7 (isearch-case-fold-search t isearch-regexp-function nil)) "to" nil nil nil nil nil)
  funcall-interactively(query-replace #("from" 0 7 (isearch-case-fold-search t isearch-regexp-function nil)) "to" nil nil nil nil nil)
  call-interactively(query-replace nil nil)
  command-execute(query-replace)

This is something new, maybe caused by some recent changes.
But I can't find anything suspicious in the commit history of replace.el.

Do you see the same error?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Apr 2021 00:21:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 21 20:21:59 2021
Received: from localhost ([127.0.0.1]:60110 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZN6U-0005JQ-Pv
	for submit <at> debbugs.gnu.org; Wed, 21 Apr 2021 20:21:59 -0400
Received: from mout.web.de ([212.227.15.3]:47977)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1lZN6S-0005JB-Cq
 for 14013 <at> debbugs.gnu.org; Wed, 21 Apr 2021 20:21:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1619050909;
 bh=f4LhhG/TJhAgKmS/ywFawYFYggafvJ/ry8jZSNioOFs=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=BmpfJRo3nrr1yQhzZDBFBEl/+KlM16tWBUV2b0IdRjuRWi/utRJr5uGnseC32bXQp
 IyLCZg1e80ZtqqPN4QRhzGFSAg1gKYjCKhTtJrQ3/DuvPCnL+W03DZ7oYmSNsdny//
 pfc2Kskn283tHec4rsKUSWI1l9tZPpCTODI9NYqU=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.96.191]) by smtp.web.de (mrweb001
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LfRiT-1lFljg24e9-00p1yK; Thu, 22
 Apr 2021 02:21:49 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
 <87eef4ep75.fsf@HIDDEN>
Date: Thu, 22 Apr 2021 02:21:48 +0200
In-Reply-To: <87eef4ep75.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 20 Apr 2021 22:22:22 +0300")
Message-ID: <87k0ov9nj7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:LIQVNilJwT0W+XF4HMRhLItvqz+NFw1qMHY3QNf7yYK3leTzpCF
 +uJR9KlaeGNw/bypwptKLWSoWrVoBe4eiwFIF/saBRfImZsnyofwRi+3ssPsOG2TYckdPZ+
 zeGEgbLC+5PsyOrh6CoUKhESL/hA2LjNka2dmlUrUrp/5IuhoVOh1LSpum1VJb0PxaxgUIF
 YEf91bzlFXLa35aIYSrsA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:VUJrozRvxpY=:7U5C/4vzFcnCkw3861lqna
 Dobwc5fK/2oA9MBCkTX1ArQLc9HStVGLsGhTE9IzgPj0Hduu4AORNSJgn72mcOWcn5Zy+GPg4
 AAT03uznXKV5fz9kHtaEhGupUtBL6FFSmvSISIvsoEiNVFUP/8usYExjZMzzhmMsLyRv3B7B2
 xiDa8/ACL9LOMhCCWze+g0CORNTJG6B/GX+MOwrJk2CK9fDVGzUqA3Kza30m5McA9fRGp9hIO
 DtzFYc7rS6HAv7SoWnPys+im1YktKAdd/SAWtIcXihO3me2DpOKx/1hRYe9HxMKpi2E3KgQJO
 NMEVYMoO4LxgsgPG+lS0i7UBBIq+0FST/3fHfXJbrl2PZZxuVx24Th13EZCNDfxu7LazCk5Sg
 OFyYgCt5Qjjp0R15tdGnL4lnAeObBYZy+wzTkhlJGXtaPk9Dr7KHq761Z4xraY/ER81MRTZwD
 bDtsb5IJTXo9TzsoYb6hWDftH0/0UmeenEIKbZvPuJAVnTkJNcW46Mornrnvl0XlhPSdtEjnm
 i8ipYw7NVJAINzQ3HraJZwe6PVyf6P/qYTNPO5CppF3/eobzutEq/RhtVsZOfqhSWS459BaKv
 HtWdkI8suGdf0slOjIY8iik77tq5RAf0fYGB83EaBmjRBK9CtrvB38N0iiMee7UuH9WoIt/Jg
 xaLIRsUVWt6M2keo0i2kfTgvqssL0+7gKPKPRmv7Ki0h9TfKwA3oJfMKJKb4gM3NlFNZM0AYh
 ROM1OXdYk669spMZO5wjR/P0uAZxqylW0+NETRbNzZF29YR03r0Jg/E74WAWzqAQhUPDU8y1h
 BNStgdMMRGRjydknHkWIagb+k3yU1a8lxUNca8ZuBO0VZg+yKzLHRtrH/hZ/S7bLKyzAdaDx+
 XOMKmiQgXOv2ugSz20I179ow/nUEyY8vidtntJBktefxMnE/QI2KsPubTBMF0UhHuZWDkGcNE
 3dqBpYFA7JCteIFV7UDcmxM9CFtOq4RpmRzcZMHm9u5PSFkbFLTq+B6NbNsM/dDoF53iQ6Baq
 Qygp9UIet8phKy69pYUNu+8kOaseIgkGAg2W6PVbS+aCEqBxb2RSwUwFeY0FloQoDE23OWfB7
 nitnR0G4XkV9U+/SWC9gVvQQZ0fWGkrMG+UOJ80J4v4ztlOn1YEIkEUnWJsuewl8pJEai2pcF
 K1BmpHihKCq+noDsqJg5skH8j+V0fTPw+caojO8f86vbFxkpMn6XGRpjtSYLLlE2q7hr12wOv
 xaUG9FwVa4+deF9WV
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Juri,

Do you ask me?

I had hoped we somehow find a better solution for the whole complex (of
searching and replacing file names in Dired/WDired).  I don't object to
give such a hint, but I don't find the approach very... aesthetic.

Regards,

Michael.


Juri Linkov <juri@HIDDEN> writes:

> > BTW, one (related) thing that I found problematic over the time: I like
> > to use query-replace on file names in WDired.  There is no way to match
> > the beginning of the file name - right?  That's sometimes a problem.  In
> > this situation it is even better to use dired-isearch-filenames -> nil
> > because then I can match the space character before the beginning of the
> > file name.
>
> This is a valid workaround.  Maybe it could be mentioned in the
> documentation?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 20 Apr 2021 19:23:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 20 15:23:14 2021
Received: from localhost ([127.0.0.1]:56042 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lYvxq-0006LP-Bi
	for submit <at> debbugs.gnu.org; Tue, 20 Apr 2021 15:23:14 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:51147)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1lYvxp-0006L8-7T
 for 14013 <at> debbugs.gnu.org; Tue, 20 Apr 2021 15:23:13 -0400
X-Originating-IP: 91.129.102.166
Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166])
 (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 40B3EC000A;
 Tue, 20 Apr 2021 19:23:05 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
Organization: LINKOV.NET
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN> <87tuo123ru.fsf@HIDDEN>
Date: Tue, 20 Apr 2021 22:22:22 +0300
In-Reply-To: <87tuo123ru.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 20
 Apr 2021 02:33:41 +0200")
Message-ID: <87eef4ep75.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

> BTW, one (related) thing that I found problematic over the time: I like
> to use query-replace on file names in WDired.  There is no way to match
> the beginning of the file name - right?  That's sometimes a problem.  In
> this situation it is even better to use dired-isearch-filenames -> nil
> because then I can match the space character before the beginning of the
> file name.

This is a valid workaround.  Maybe it could be mentioned in the documentation?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 20 Apr 2021 00:33:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 19 20:33:51 2021
Received: from localhost ([127.0.0.1]:52402 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lYeKt-0006Ss-Cg
	for submit <at> debbugs.gnu.org; Mon, 19 Apr 2021 20:33:51 -0400
Received: from mout.web.de ([212.227.15.4]:47411)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1lYeKr-0006Sd-45
 for 14013 <at> debbugs.gnu.org; Mon, 19 Apr 2021 20:33:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1618878822;
 bh=jvvbfPaT5/Cz6vLpgja0kH2dgsNqs5rxEMVUTsmYQQ0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=iGByPC/Fodh30CLEjmCEi7GvFfHmqfetDtjT1kTnirk2Xcm+PcISQLuJVxRf4tO2X
 5390bh9lw2JK4M0NlgaI+4MvqxzZCY0TTv2QosOnbnrRTCFUWN8pgsHyCYgKp06Vaz
 sDPU5HQQ+CEt9PoDAUHuk8DXQ8kqxSE3i7tW7oe4=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.96.191]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N2SL5-1le3nF113v-013kaw; Tue, 20
 Apr 2021 02:33:42 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching
 text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
 <87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
 <87zjxxsd6c.fsf@HIDDEN>
Date: Tue, 20 Apr 2021 02:33:41 +0200
In-Reply-To: <87zjxxsd6c.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 21
 Mar 2013 03:24:11 +0100")
Message-ID: <87tuo123ru.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:K2A755C2tNv4pGw09835KqR4x7OHgwLU5dwDpzaakggEPtDCsKd
 Ge9cmX5Rch7ge6D4F2jF70Y3dfPBExlQAtu3dfOnNyUTkaZFEFHr0iN3FC7S0EWSJpOV93I
 2Q9+KOsa71bLPrI08SU0RV6yW0LZac4+86DmS44qF/xw71NkNrBIOkPt6RZgafTS/S9d//D
 M5L5paUN2y2P49hj2m1Og==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:vxlkF1qLmo8=:qOho8pHIV2zIW4gUoVjy44
 /bQyAyNc1HIrA9T+BH/qMR3nBQsGO5yzgDhUFAVihnA+fGpG/sDI4lO4icdpmAghMsc/sq34p
 wrE29M+pJ0yQTEXYUFMYWP7BIgFqE2UonYrsK44czTObnFc+xmCXvXFEIwWhJZm2twiJfMM2R
 mtbWgxFi+7mBu5/1H3wnP55WaJTjSygLB5o+NHamtXasDU3xMt1T/sjgNbgkmte2+la/o5FQc
 wyeN8xlg76CP5enwbXs2sF/8E6sKUZcXT2NOWzbi7yuwCkeoR3k2oQr2CtD49xYF4hDTbI26F
 kDOq12IUkDNoTBgbB8kIgo2/r8X51sZUa3oFOeg9cEsDBLozqcTztsEah94YoVKKPy7JwurFD
 92u1vtbhSVvxTOqbd6yywcqHlpWffRSR/Ov+wX++NATVXxDI/kwANJpnakMYLA3KSXVivu8J9
 o3MnIF35xNA8N9r6Nmm1Ccwf/vytaEJOJaVcYSR/mUo61JILGsWRSlyanWeg4oEiAOiq9yodT
 TTNNvqF+dhOU/iRuU4/AXuoI7SJbhqKW1AOwm4aV4IhqNAUTMi899N6Fqp0I7El+oiQplRbsi
 azf1xwrniBphYC7m6Sav8tnOGuRn280TKBxV6kETAoowyZIas/8+quxjKrOEEKuKgccrVhs9V
 cqJ1w+Ly++1MuYzVbYZvJ1O8fvq9vJfMrVqdJi7iy73eaUS3+oRfs98AI3f18BI2Gb0CkLVZe
 KhpYB1+VXrmeybxd3jtQcXeCJ4ljFlY3AKZRD4zmFS1EMtGyMbZCFTzLkITIIG0QqceVEbyRt
 VvFuugsNEYxUpDeTlI9+Qcogho9h2qENLHgDsVkw4ytlrYs5AgBvWwQ0+3QSKw3W6m523sXoo
 WPWWklfSvmaNqqe9RFxODluCNrATKDUhyVnkBm97m6vM0kpZIGkSPxW5byOmPUVjlUBnLFSkC
 nemoAq5KJNkHpvfcQLnV6AwoV5qVhV42l/6crUqSNpxfgL/6569k7Z1CZ6ZovqkWWHC44PzF6
 SRQtjxBhKd0PcJJSTpwL0AnFtA5TDVg+H1Ra1xjdDs2VY5HN0wxGLBO47ELH4bj+g3Xw1VANN
 VjJ7/6ZweCr+CiVKMwSO5TvQl5iPLJhJNX/zS6xb5/zHc5A4AvBel++O9U5J/0ARvzUSC1Xt+
 6VcsZ/sMYxY8EP/VppVAZVIPwLr2wQeGxc+xNG+8nuffbAN6Xl9IBUx/ewKPfw9m/zLuESoaz
 dbq++ngtfDtKc1ZOq
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Right, thanks.  Now I'm beginning to understand how this code works.

BTW, one (related) thing that I found problematic over the time: I like
to use query-replace on file names in WDired.  There is no way to match
the beginning of the file name - right?  That's sometimes a problem.  In
this situation it is even better to use dired-isearch-filenames -> nil
because then I can match the space character before the beginning of the
file name.


Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 27 May 2013 23:49:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 27 19:49:34 2013
Received: from localhost ([127.0.0.1]:36922 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Uh7AU-0005Y6-0a
	for submit <at> debbugs.gnu.org; Mon, 27 May 2013 19:49:34 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:33935
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1Uh7AR-0005Xx-M6
	for 14013 <at> debbugs.gnu.org; Mon, 27 May 2013 19:49:32 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 35879258B9E91C;
	Mon, 27 May 2013 16:48:15 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
	<87a9pv2be0.fsf@HIDDEN> <87obda5iy2.fsf@HIDDEN>
	<87bo7w6tc0.fsf@HIDDEN> <87mwrgav0v.fsf@HIDDEN>
Date: Tue, 28 May 2013 02:45:03 +0300
In-Reply-To: <87mwrgav0v.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 28
	May 2013 01:00:00 +0200")
Message-ID: <87vc64yogw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

>> > I must also admit that I got used to use `dired-hide-details-mode' in
>> > combination with isearch now and am very happy.  (BTW, I have
>> > search-invisible -> open, but invisible fields are not opened - is this
>> > normal?).
>>
>> I wonder why do you want isearch to open hidden dired details when you use
>> `dired-hide-details-mode' with the intention to hide them from isearch?
>
> You misunderstood.  I don't want isearch to open dired details.  Just
> in one moment, I wondered why it actually didn't, although
> search-invisible was bound to open (because I generally want isearch to
> open hidden stuff).

Good.  Then let's leave dired details always hidden from isearch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 27 May 2013 23:01:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 27 19:01:32 2013
Received: from localhost ([127.0.0.1]:36892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Uh6Pz-0003t5-KS
	for submit <at> debbugs.gnu.org; Mon, 27 May 2013 19:01:31 -0400
Received: from mout.web.de ([212.227.15.3]:51975)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1Uh6Pw-0003sm-CC
	for 14013 <at> debbugs.gnu.org; Mon, 27 May 2013 19:01:29 -0400
Received: from drachen.dragon ([89.204.135.20]) by smtp.web.de (mrweb103) with
	ESMTPSA (Nemesis) id 0MRlED-1UrjLx13cn-00TGCo;
	Tue, 28 May 2013 01:00:05 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
	<87a9pv2be0.fsf@HIDDEN> <87obda5iy2.fsf@HIDDEN>
	<87bo7w6tc0.fsf@HIDDEN>
Date: Tue, 28 May 2013 01:00:00 +0200
In-Reply-To: <87bo7w6tc0.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	27 May 2013 23:50:07 +0300")
Message-ID: <87mwrgav0v.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:0xeoOJ7e2OHuXfhJw7+m88SPTp9TJOKqWg7a6DT4pzo
	83obnKapP4S3Gxfg/T9kyQETHQBzkIc79dZ2Y67aze0CtKTJpi
	Y6XrcPko1Jnwl54XIp/8143FxyeJvWnDAyV9uraIzGthVEm4b5
	BDWdX0mF60mjoqp0utn3u9EndYQb2XmszhdPyBNGQt1sTQVSMb
	YSl1q0xRhmQWHQHbKnnNLhr9SunKCPyxetsVGljLK0=
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

Juri Linkov <juri@HIDDEN> writes:

> > I must also admit that I got used to use `dired-hide-details-mode' in
> > combination with isearch now and am very happy.  (BTW, I have
> > search-invisible -> open, but invisible fields are not opened - is this
> > normal?).
>
> I wonder why do you want isearch to open hidden dired details when you use
> `dired-hide-details-mode' with the intention to hide them from isearch?

You misunderstood.  I don't want isearch to open dired details.  Just
in one moment, I wondered why it actually didn't, although
search-invisible was bound to open (because I generally want isearch to
open hidden stuff).


Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 27 May 2013 21:09:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 27 17:09:35 2013
Received: from localhost ([127.0.0.1]:36847 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Uh4ff-000096-95
	for submit <at> debbugs.gnu.org; Mon, 27 May 2013 17:09:35 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:49978
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1Uh4fd-00008y-2J
	for 14013 <at> debbugs.gnu.org; Mon, 27 May 2013 17:09:34 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 7AC2E258B9E938;
	Mon, 27 May 2013 14:08:16 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
	<87a9pv2be0.fsf@HIDDEN> <87obda5iy2.fsf@HIDDEN>
Date: Mon, 27 May 2013 23:50:07 +0300
In-Reply-To: <87obda5iy2.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 19
	Apr 2013 23:06:29 +0200")
Message-ID: <87bo7w6tc0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> I must say I got a bit lost.  Still learning how isearch internally
> works.  Juri, can you help me with a new patch?

Sorry, I still have not figured out how to limit the search for ".*"
only to file names.  Maybe there is no good solution.  For example,
to limit operations to file names only, Wdired uses such kludge
as `wdired-downcase-word' and `wdired-upcase-word' to skip non-file
parts of Dired buffers.

For a regexp ".*" to match file names only this might require a new
regexp feature for specifying text-properties in regexps similar to
`\sCODE' for syntax classes, or `\cC' for character categories,
or character classes like `[:ascii:]'.  So for example, a regexp like
"^[#dired-filename#]*$" would match only the text with text-properties
`dired-filename'.

> I must also admit that I got used to use `dired-hide-details-mode' in
> combination with isearch now and am very happy.  (BTW, I have
> search-invisible -> open, but invisible fields are not opened - is this
> normal?).

I wonder why do you want isearch to open hidden dired details when you use
`dired-hide-details-mode' with the intention to hide them from isearch?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 20 Apr 2013 01:54:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 19 21:54:29 2013
Received: from localhost ([127.0.0.1]:60977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UTN0X-0007U4-9H
	for submit <at> debbugs.gnu.org; Fri, 19 Apr 2013 21:54:29 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:5729)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1UTN0U-0007Tt-TJ
	for 14013 <at> debbugs.gnu.org; Fri, 19 Apr 2013 21:54:27 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+LAd/2dsb2JhbABEuzWDWRdzgh8BBScvIxALNBIUGA0kiCTBLZEKA6R6gV6DEw
X-IPAS-Result: Av8EABK/CFHO+LAd/2dsb2JhbABEuzWDWRdzgh8BBScvIxALNBIUGA0kiCTBLZEKA6R6gV6DEw
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; 
   d="scan'208";a="7841896"
Received: from 206-248-176-29.dsl.teksavvy.com (HELO ceviche.home)
	([206.248.176.29])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	19 Apr 2013 21:49:45 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 9B7E9660E8; Fri, 19 Apr 2013 21:49:48 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Message-ID: <jwvwqrynfa6.fsf-monnier+emacs@HIDDEN>
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
	<87a9pv2be0.fsf@HIDDEN> <87obda5iy2.fsf@HIDDEN>
Date: Fri, 19 Apr 2013 21:49:48 -0400
In-Reply-To: <87obda5iy2.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 19
	Apr 2013 23:06:29 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 14013
Cc: Juri Linkov <juri@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> (BTW, I have search-invisible -> open, but invisible fields are not
> opened - is this normal?).

I think it's "normal" in the sense that isearch only handles `invisible'
when added by overlays rather than by text-properties.  IOW, it's
a known problem.  Aka "patch welcome".


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 19 Apr 2013 21:11:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 19 17:11:19 2013
Received: from localhost ([127.0.0.1]:60721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UTIaV-0002Ci-Gr
	for submit <at> debbugs.gnu.org; Fri, 19 Apr 2013 17:11:19 -0400
Received: from mout.web.de ([212.227.17.11]:58929)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UTIaT-0002Cb-T2
	for 14013 <at> debbugs.gnu.org; Fri, 19 Apr 2013 17:11:18 -0400
Received: from drachen.dragon ([89.204.130.17]) by smtp.web.de (mrweb003) with
	ESMTPSA (Nemesis) id 0MT8cQ-1U4adO38UQ-00RjVF;
	Fri, 19 Apr 2013 23:06:38 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
	<87a9pv2be0.fsf@HIDDEN>
Date: Fri, 19 Apr 2013 23:06:29 +0200
In-Reply-To: <87a9pv2be0.fsf@HIDDEN> (Juri Linkov's message of "Sat,
	23 Mar 2013 02:44:07 +0200")
Message-ID: <87obda5iy2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:cITanRB0EaCg/eKddsX//0sujonV6pYFpfb+CfxUgy6
	5dU77DjucKYtXNAMffK3CgA6H2EOEpR9p6T6uwx/qyWk2Lo0WR
	ELlr/7gbuJIMaL/T8Vqg0DRC2YN+hYJ2K9//Vgsb9MkdcJ7a3+
	tuh4umLTp/Nvz8kDadsRxRRiQOUlqLFd+WY5nqDOyf6TX5Zp2c
	pI4XumBp7wgmASfY0P0s7wlJAOifjKPgI3qpoC6aPM=
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 14013
Cc: Stefan Monnier <monnier@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Juri Linkov <juri@HIDDEN> writes:

> > Why not (add-function :around (local isearch-search-fun-function)
> >                       #'dired--isearch-filenames)
>
> This is even better, so Michael could easily try different ideas
> without applying patches.

I must say I got a bit lost.  Still learning how isearch internally
works.  Juri, can you help me with a new patch?

I must also admit that I got used to use `dired-hide-details-mode' in
combination with isearch now and am very happy.  (BTW, I have
search-invisible -> open, but invisible fields are not opened - is this
normal?).


Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 23 Mar 2013 01:12:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 22 21:12:57 2013
Received: from localhost ([127.0.0.1]:41389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UJD0z-0000pZ-C3
	for submit <at> debbugs.gnu.org; Fri, 22 Mar 2013 21:12:57 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:38823
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1UJD0w-0000pR-1n
	for 14013 <at> debbugs.gnu.org; Fri, 22 Mar 2013 21:12:55 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 798F1258B92960;
	Fri, 22 Mar 2013 18:10:53 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<8738vowa1i.fsf@HIDDEN> <87k3p0cle3.fsf@HIDDEN>
	<87d2uscjeh.fsf@HIDDEN>
Date: Sat, 23 Mar 2013 02:49:37 +0200
In-Reply-To: <87d2uscjeh.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 22
	Mar 2013 02:28:38 +0100")
Message-ID: <87ppyqyld2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

>> The patch is complete and it's working in my tests for ".*" and ".+".
>
> Just ".*" also works for me as it should (as supposed to before, which
> shows that I indeed use your new code).  But if I try "a.*", the
> following matches begin before the file names (my user name ends with
> the letter a).

When Isearch doesn't find "a.*" in the current filename it continues
searching from the beginning of the next Dired line and finds a match
in the details area that contains user names and permissions.
It seems the search should be limited to the end of the filename
on the current line.  But setting the BOUND arg of `search-forward-regexp'
to the end of the filename will cause Isearch to fail for the whole buffer.

BTW, I looked at your previous proof of concept and noticed that even though
it works correctly, its (goto-char (1+ beg)) is very inefficient especially
in the case of ".*" where is advances slowly by 1 character offset
for every search function call in the details area outside of filenames.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 23 Mar 2013 00:48:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 22 20:48:45 2013
Received: from localhost ([127.0.0.1]:41372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UJCdZ-0000HS-Cc
	for submit <at> debbugs.gnu.org; Fri, 22 Mar 2013 20:48:45 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:57150
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1UJCdX-0000HL-2R
	for 14013 <at> debbugs.gnu.org; Fri, 22 Mar 2013 20:48:43 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id AC9A5258B92960;
	Fri, 22 Mar 2013 17:46:42 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
Date: Sat, 23 Mar 2013 02:44:07 +0200
In-Reply-To: <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Thu, 21 Mar 2013 21:59:52 -0400")
Message-ID: <87a9pv2be0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 14013
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

>> -         (pos1 (save-excursion (funcall func string bound noerror)))
>> +         (pos1 (save-excursion
>> +		 (run-hooks 'isearch-search-fun-pre-hook)
>> +		 (funcall func string bound noerror)))
>
> Doesn't sound good.
>
>> +    (add-hook 'isearch-search-fun-pre-hook 'dired-isearch-filenames-pre-hook nil t)))
>
> Why not (add-function :around (local isearch-search-fun-function)
>                       #'dired--isearch-filenames)

This is even better, so Michael could easily try different ideas
without applying patches.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Mar 2013 02:02:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 21 22:02:13 2013
Received: from localhost ([127.0.0.1]:39692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UIrIz-0006QE-Sp
	for submit <at> debbugs.gnu.org; Thu, 21 Mar 2013 22:02:10 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4227)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1UIrIw-0006Pt-Jq
	for 14013 <at> debbugs.gnu.org; Thu, 21 Mar 2013 22:02:03 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxKvA/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT
X-IPAS-Result: Av8EABK/CFFFxKvA/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDpHqBXoMT
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; 
   d="scan'208";a="5501829"
Received: from 69-196-171-192.dsl.teksavvy.com (HELO pastel.home)
	([69.196.171.192])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	21 Mar 2013 22:00:03 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id B396567AC3; Thu, 21 Mar 2013 21:59:52 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Message-ID: <jwvvc8kurq1.fsf-monnier+emacs@HIDDEN>
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
Date: Thu, 21 Mar 2013 21:59:52 -0400
In-Reply-To: <87vc8ke4os.fsf@HIDDEN> (Juri Linkov's message of "Fri,
	22 Mar 2013 01:03:31 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 14013
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> -         (pos1 (save-excursion (funcall func string bound noerror)))
> +         (pos1 (save-excursion
> +		 (run-hooks 'isearch-search-fun-pre-hook)
> +		 (funcall func string bound noerror)))

Doesn't sound good.

> +    (add-hook 'isearch-search-fun-pre-hook 'dired-isearch-filenames-pre-hook nil t)))

Why not (add-function :around (local isearch-search-fun-function)
                      #'dired--isearch-filenames)
and then

   (defun dired--isearch-filenames (iiff &rest args)
     (let ((fun (apply iiff args)))
       (lambda (&rest args)
         (unless (get-text-property (point) 'dired-filename)
           (if isearch-forward
   	       (goto-char (or (next-single-property-change
                               (point) 'dired-filename)
                              (point-max)))
             (goto-char (or (previous-single-property-change
                            (point) 'dired-filename)
                        (point-min)))))
         (apply fun args))))


-- Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Mar 2013 01:30:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 21 21:30:46 2013
Received: from localhost ([127.0.0.1]:39672 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UIqof-0005gz-0b
	for submit <at> debbugs.gnu.org; Thu, 21 Mar 2013 21:30:45 -0400
Received: from mout.web.de ([212.227.15.4]:61360)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UIqoc-0005gp-Jv
	for 14013 <at> debbugs.gnu.org; Thu, 21 Mar 2013 21:30:43 -0400
Received: from drachen.dragon ([89.204.137.90]) by smtp.web.de (mrweb002) with
	ESMTPSA (Nemesis) id 0Mf0a9-1U3Ee12oht-00OGWI;
	Fri, 22 Mar 2013 02:28:46 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<8738vowa1i.fsf@HIDDEN> <87k3p0cle3.fsf@HIDDEN>
Date: Fri, 22 Mar 2013 02:28:38 +0100
In-Reply-To: <87k3p0cle3.fsf@HIDDEN> (Juri Linkov's message of "Fri,
	22 Mar 2013 02:45:40 +0200")
Message-ID: <87d2uscjeh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:0XA2DrmrsoieC4mhWiXGLqd8jz7nd6W98/Zk2kdxOeS
	eXSzGh1Y8FsXqzhGWYC6ppJhhO4h0Eh6uFlGBMz8amXWb6Sh9N
	GKlVCDk5rPD8+AI9oCqcfGDEAsqz/PZGmGGDh6XlINL4R1b1oG
	TnuvGm1lOFsG19OFfdv7WUT8i8jPa5Mvrr0LspVJspEwyvyxGo
	IkyGdg588hpzYqugY6H4JsuSQ7o5OfuLDvJhToGuLE=
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.4 (----)

Juri Linkov <juri@HIDDEN> writes:

> > I quickly tested it.  But it doesn't yet do the right thing.  For the
> > first search hit, it does - but if you repeat searching (by repeatedly
> > hitting C-M-s), the behavior is like it is now - i.e., with repeated
> > searching, there is no progress.
>
> It doesn't work for `C-M-s' because by default the search in Dired
> is not restricted to filenames (the default value of
> dired-isearch-filenames'
> is "No restrictions").

No no, of course I have `dired-isearch-filenames' configured.  I already
double-checked everything - although it's already late here, I don't
think I made an error while testing.

> > Do you need to run `isearch-search-fun-pre-hook' at other places as well?
>
> The patch is complete and it's working in my tests for ".*" and ".+".

Just ".*" also works for me as it should (as supposed to before, which
shows that I indeed use your new code).  But if I try "a.*", the
following matches begin before the file names (my user name ends with
the letter a).


Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Mar 2013 00:49:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 21 20:49:32 2013
Received: from localhost ([127.0.0.1]:39622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UIqAl-0003oC-RF
	for submit <at> debbugs.gnu.org; Thu, 21 Mar 2013 20:49:32 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:37309
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1UIqAj-0003o4-9H
	for 14013 <at> debbugs.gnu.org; Thu, 21 Mar 2013 20:49:30 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 4E010258B92960;
	Thu, 21 Mar 2013 17:47:34 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
	<8738vowa1i.fsf@HIDDEN>
Date: Fri, 22 Mar 2013 02:45:40 +0200
In-Reply-To: <8738vowa1i.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 22
	Mar 2013 01:30:33 +0100")
Message-ID: <87k3p0cle3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> I quickly tested it.  But it doesn't yet do the right thing.  For the
> first search hit, it does - but if you repeat searching (by repeatedly
> hitting C-M-s), the behavior is like it is now - i.e., with repeated
> searching, there is no progress.

It doesn't work for `C-M-s' because by default the search in Dired
is not restricted to filenames (the default value of `dired-isearch-filenames'
is "No restrictions").  You have to start Isearch either by running
`M-x dired-isearch-filenames-regexp' or by customizing `dired-isearch-filenames'
to "Always search in file names" and then starting Isearch with `C-M-s'.

> Do you need to run `isearch-search-fun-pre-hook' at other places as well?

The patch is complete and it's working in my tests for ".*" and ".+".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 22 Mar 2013 00:32:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 21 20:32:43 2013
Received: from localhost ([127.0.0.1]:39560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UIpuU-0003K9-AP
	for submit <at> debbugs.gnu.org; Thu, 21 Mar 2013 20:32:43 -0400
Received: from mout.web.de ([212.227.17.12]:55247)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UIpuR-0003K0-PZ
	for 14013 <at> debbugs.gnu.org; Thu, 21 Mar 2013 20:32:41 -0400
Received: from drachen.dragon ([89.204.137.90]) by smtp.web.de (mrweb001) with
	ESMTPSA (Nemesis) id 0MCZP8-1UR34T3vt4-009Nlg;
	Fri, 22 Mar 2013 01:30:44 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN> <87vc8ke4os.fsf@HIDDEN>
Date: Fri, 22 Mar 2013 01:30:33 +0100
In-Reply-To: <87vc8ke4os.fsf@HIDDEN> (Juri Linkov's message of "Fri,
	22 Mar 2013 01:03:31 +0200")
Message-ID: <8738vowa1i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:BZ/tYJLha6V4uQc2xUyuXq/c3D0BJQeU9o1XLw3bVic
	NeWeySs3+mgI3es2GEI9+UiYAGf3epHCx0nfYWNkGnZmZZ7deo
	9KohRxOZ6NFpscNgoSF6kC4tZ2WBzan2mhuCo4q4UYKO/ihQrs
	fCNwRGP0OtCHky9DqLFzyzQ3OcdONUYuP9zC4vUqJAtaZi8bzI
	ZQ5msibyeI3cUaR9p9+j5zt00IyuJZyO9CabNQd72A=
X-Spam-Score: -2.5 (--)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.4 (----)

Hi Juri,

thanks for working on this!

> > 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.
>
> Instead of duplicating the complex logic of `isearch-search-fun-function'
> in a new specialized function it would be better to implement this
> using hooks.

Ok.  In the meanwhile, I wrote a proof of concept, which seems to work
well (just for the record):

(defun dired-search-forward-filename-regexp (&rest args)
  (catch 'result
    (while t
      (let* ((result (apply #'search-forward-regexp args))
             (beg (and result (match-beginning 0)))
             (end (and result (match-end 0))))
        (if (or (not result)
                (and (get-text-property beg 'dired-filename)
                     (or (get-text-property end 'dired-filename)
                         (eq (char-after end) ?\n))))
            (throw 'result result)
          (if (eobp)
              (throw 'result nil)
            (goto-char (1+ beg))))))))

To test shortly, just eval

 (defun isearch-search-fun () 'dired-search-forward-filename-regexp)

Works well for me.  But I think that your approach is more appropriate
here.

> We have already a post-processing hook `isearch-update-post-hook'
> invoked after isearch has found matches.  So we need a similar hook
> invoked before isearch starts searching matches, with a name like
> `isearch-search-fun-pre-hook'.
>
> It fixes your test case of searching for ".*":

I quickly tested it.  But it doesn't yet do the right thing.  For the
first search hit, it does - but if you repeat searching (by repeatedly
hitting C-M-s), the behavior is like it is now - i.e., with repeated
searching, there is no progress.  Do you need to run
`isearch-search-fun-pre-hook' at other places as well?


Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 23:09:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 21 19:09:32 2013
Received: from localhost ([127.0.0.1]:39487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UIoc0-0001MB-DC
	for submit <at> debbugs.gnu.org; Thu, 21 Mar 2013 19:09:32 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:50244
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1UIoby-0001M3-Dg
	for 14013 <at> debbugs.gnu.org; Thu, 21 Mar 2013 19:09:31 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id CF732258B92960;
	Thu, 21 Mar 2013 16:07:35 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
	<87zjxxsd6c.fsf@HIDDEN>
Date: Fri, 22 Mar 2013 01:03:31 +0200
In-Reply-To: <87zjxxsd6c.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 21
	Mar 2013 03:24:11 +0100")
Message-ID: <87vc8ke4os.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

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

Instead of duplicating the complex logic of `isearch-search-fun-function'
in a new specialized function it would be better to implement this
using hooks.

We have already a post-processing hook `isearch-update-post-hook'
invoked after isearch has found matches.  So we need a similar hook
invoked before isearch starts searching matches, with a name like
`isearch-search-fun-pre-hook'.

It fixes your test case of searching for ".*":

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2013-02-25 21:10:59 +0000
+++ lisp/isearch.el	2013-03-21 22:53:41 +0000
@@ -163,6 +163,9 @@ (defcustom isearch-resume-in-command-his
 (defvar isearch-mode-hook nil
   "Function(s) to call after starting up an incremental search.")
 
+(defvar isearch-search-fun-pre-hook nil
+  "Function(s) to call before isearch starts searching matches in the buffer.")
+
 (defvar isearch-update-post-hook nil
   "Function(s) to call after isearch has found matches in the buffer.")
 
@@ -2651,7 +2654,9 @@ (defun isearch-search-string (string bou
 If found, move point to the end of the occurrence,
 update the match data, and return point."
   (let* ((func (isearch-search-fun))
-         (pos1 (save-excursion (funcall func string bound noerror)))
+         (pos1 (save-excursion
+		 (run-hooks 'isearch-search-fun-pre-hook)
+		 (funcall func string bound noerror)))
          pos2)
     (when (and
 	   ;; Avoid "obsolete" warnings for translation-table-for-input.

=== modified file 'lisp/dired-aux.el'
--- lisp/dired-aux.el	2013-02-28 21:51:11 +0000
+++ lisp/dired-aux.el	2013-03-21 22:54:14 +0000
@@ -2506,6 +2506,12 @@ (defun dired-isearch-filenames-toggle ()
   (setq isearch-success t isearch-adjusted t)
   (isearch-update))
 
+(defun dired-isearch-filenames-pre-hook ()
+  (unless (get-text-property (point) 'dired-filename)
+    (if isearch-forward
+	(goto-char (or (next-single-property-change (point) 'dired-filename) (point-max)))
+      (goto-char (or (previous-single-property-change (point) 'dired-filename) (point-min))))))
+
 ;;;###autoload
 (defun dired-isearch-filenames-setup ()
   "Set up isearch to search in Dired file names.
@@ -2518,14 +2524,16 @@ (defun dired-isearch-filenames-setup ()
     (setq dired-isearch-filter-predicate-orig
 	  (default-value 'isearch-filter-predicate))
     (setq-default isearch-filter-predicate 'dired-isearch-filter-filenames)
-    (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t)))
+    (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t)
+    (add-hook 'isearch-search-fun-pre-hook 'dired-isearch-filenames-pre-hook nil t)))
 
 (defun dired-isearch-filenames-end ()
   "Clean up the Dired file name search after terminating isearch."
   (setq isearch-message-prefix-add nil)
   (define-key isearch-mode-map "\M-sf" nil)
   (setq-default isearch-filter-predicate dired-isearch-filter-predicate-orig)
-  (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t))
+  (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)
+  (remove-hook 'isearch-search-fun-pre-hook 'dired-isearch-filenames-pre-hook t))
 
 (defun dired-isearch-filter-filenames (beg end)
   "Test whether the current search hit is a visible file name.

=== modified file 'lisp/wdired.el'
--- lisp/wdired.el	2013-03-05 17:13:01 +0000
+++ lisp/wdired.el	2013-03-21 22:55:11 +0000
@@ -241,6 +241,7 @@ (defun wdired-change-to-wdired-mode ()
   (set (make-local-variable 'query-replace-skip-read-only) t)
   (set (make-local-variable 'isearch-filter-predicate)
        'wdired-isearch-filter-read-only)
+  (add-hook 'isearch-search-fun-pre-hook 'dired-isearch-filenames-pre-hook nil t)
   (use-local-map wdired-mode-map)
   (force-mode-line-update)
   (setq buffer-read-only nil)

Also (run-hooks 'isearch-search-fun-pre-hook) should be added to replace.el,
but first I have to install the pending patches in bug#11378 and bug#11746.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 02:26:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 20 22:26:14 2013
Received: from localhost ([127.0.0.1]:38247 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UIVCo-0004DN-6O
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 22:26:14 -0400
Received: from mout.web.de ([212.227.17.11]:59297)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UIVCk-0004DF-KZ
	for 14013 <at> debbugs.gnu.org; Wed, 20 Mar 2013 22:26:11 -0400
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
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN> <87620lvavl.fsf@HIDDEN>
Date: Thu, 21 Mar 2013 03:24:11 +0100
In-Reply-To: <87620lvavl.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	21 Mar 2013 02:45:34 +0200")
Message-ID: <87zjxxsd6c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:NPAwmSf4yshE6EWrAfc3pIsoXSnxio6vVNno9VD/lrg
	8/bh4d+R5PNZbOwCUgdDi/HTyProwCpI+HLaBd2BLX+8Ox8700
	aMYS68GqfefrPaZHjjbVgMYXHV6sRNY5gbbi/lzdhgTJbCdtqL
	5FMduoW0pGt0J0IgFL5NfZRO+RW2mTHYAJLuJELioz7NDQCAtW
	YVCWxv24zO9x4Ypm9CUWQ4fIeQDyCEuncSoDqovV78=
X-Spam-Score: -2.5 (--)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.4 (----)

Juri Linkov <juri@HIDDEN> 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.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 00:53:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 20 20:53:09 2013
Received: from localhost ([127.0.0.1]:38205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UITki-000275-QJ
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 20:53:09 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:34572
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1UITke-00026v-P7
	for 14013 <at> debbugs.gnu.org; Wed, 20 Mar 2013 20:53:06 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 6FDFE258B9E91C;
	Wed, 20 Mar 2013 17:51:15 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
	<87d2ut4mji.fsf@HIDDEN>
Date: Thu, 21 Mar 2013 02:45:34 +0200
In-Reply-To: <87d2ut4mji.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 21
	Mar 2013 01:35:45 +0100")
Message-ID: <87620lvavl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

>> .* 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 :)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 00:37:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 20 20:37:55 2013
Received: from localhost ([127.0.0.1]:38199 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UITVv-0001hV-4o
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 20:37:55 -0400
Received: from mout.web.de ([212.227.17.11]:49739)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UITVo-0001hG-HI
	for 14013 <at> debbugs.gnu.org; Wed, 20 Mar 2013 20:37:49 -0400
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
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
References: <87li9hk5e5.fsf@HIDDEN> <87wqt1vd0o.fsf@HIDDEN>
Date: Thu, 21 Mar 2013 01:35:45 +0100
In-Reply-To: <87wqt1vd0o.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	21 Mar 2013 01:59:19 +0200")
Message-ID: <87d2ut4mji.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:aifuUOeYb4lWD5I/mG8om23nTNLNKNfCUsTN5zq8Lh4
	n1domNoHzs+Pj+LwzQ4j/yf4QgpRehlahgKuTOAdgxPQ0VjON9
	KGD1SGr/UBy7Y/a30a/a5nPlOHfELmeAw/YK9t5qMcEnk7QXFV
	nHHsoCbJm9VtlDAUnxXmQ1V2ENihUT+xiDrIHDzduoZ86v0dCb
	CV499fDHWXp4iCrTvkn/svje6H7cw6y3jH2zvzwD84=
X-Spam-Score: -2.5 (--)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.4 (----)

Juri Linkov <juri@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at 14013 <at> debbugs.gnu.org:


Received: (at 14013) by debbugs.gnu.org; 21 Mar 2013 00:02:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 20 20:02:37 2013
Received: from localhost ([127.0.0.1]:38183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UISxo-0000sv-Mo
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 20:02:37 -0400
Received: from ps18281.dreamhost.com ([69.163.218.105]:36604
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri@HIDDEN>) id 1UISxj-0000si-S3
	for 14013 <at> debbugs.gnu.org; Wed, 20 Mar 2013 20:02:34 -0400
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 87D6A258B9E91C;
	Wed, 20 Mar 2013 17:00:42 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#14013: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Organization: JURTA
References: <87li9hk5e5.fsf@HIDDEN>
Date: Thu, 21 Mar 2013 01:59:19 +0200
In-Reply-To: <87li9hk5e5.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 21
	Mar 2013 00:39:30 +0100")
Message-ID: <87wqt1vd0o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 14013
Cc: 14013 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.5 (/)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Mar 2013 23:41:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 20 19:41:38 2013
Received: from localhost ([127.0.0.1]:38178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UISdU-0000OV-1U
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 19:41:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39481)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UISdR-0000ON-Bk
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 19:41:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UISbh-0000CP-0v
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 19:39:45 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-104.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,RCVD_IN_XBL,RP_MATCHES_RCVD,USER_IN_WHITELIST
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:41557)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UISbg-0000CL-Ty
	for submit <at> debbugs.gnu.org; Wed, 20 Mar 2013 19:39:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50831)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UISbf-00069a-Nc
	for bug-gnu-emacs@HIDDEN; Wed, 20 Mar 2013 19:39:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UISbe-0000Br-4n
	for bug-gnu-emacs@HIDDEN; Wed, 20 Mar 2013 19:39:43 -0400
Received: from mout.web.de ([212.227.15.3]:58166)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1UISbd-0000Bn-Qz
	for bug-gnu-emacs@HIDDEN; Wed, 20 Mar 2013 19:39:42 -0400
Received: from drachen.dragon ([82.113.106.205]) by smtp.web.de (mrweb103)
	with ESMTPSA (Nemesis) id 0LsyRS-1UgCmV0VQY-012miw for
	<bug-gnu-emacs@HIDDEN>; Thu, 21 Mar 2013 00:39:40 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50;
	dired-isearch-filenames-regexp is matching text outside filenames
Date: Thu, 21 Mar 2013 00:39:30 +0100
Message-ID: <87li9hk5e5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:VTqAPmzDtXMMI7MsJ4jVFhatpYzHrYELeetxQf3yBtR
	sHyan8EZmTDPXdGw3x5prD0VbUrtf/kl9D/J6/MvhuZ1e/jsf8
	f601MmoAtD40Y2HMy+YaQ0Va2B7mGFAkT5kENPsCfyaWP91H03
	bdHasoHFHIJgyD6/CPI/kzc8z27OELs6246yaKvFv/kYm/bY1o
	vY5SXyEzVyn2PUNw/7oYyGJcbkgjZJMdIUDOLXRFzw=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: michael_heerdegen@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)


Hello,

the recipe is quite trivial:

- start emacs -Q

- dired a directory with some files in it

- let c be a character that appears in a file line before the filename,
  e.g. the character "r" in this line:

  drwxr-xr-x   3 micha micha    4096 Mar  3 21:51 bin
   ^
- 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.


This happens in all Emacs versions I tested: 23.4, 24.2, and trunk.


Thanks,

Michael.






In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2013-03-17 on dex, modified by Debian
 (emacs-snapshot package, version 2:20130317-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux 7.0 (wheezy)

Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man
 --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --without-compress-info --with-crt-dir=/usr/lib/x86_64-linux-gnu/
 --with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes
 CFLAGS='-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2'
 CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-g -Wl,--as-needed
 -znocombreloc''

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp




Acknowledgement sent to michael_heerdegen@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#14013; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 15 Jun 2022 16:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.