From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames Date: Fri, 01 Apr 2022 19:39:10 +0300 Organization: LINKOV.NET Message-ID: <861qygal8h.fsf@mail.linkov.net> References: <87li9hk5e5.fsf@web.de> <87wqt1vd0o.fsf@mail.jurta.org> <87d2ut4mji.fsf@web.de> <87620lvavl.fsf@mail.jurta.org> <87zjxxsd6c.fsf@web.de> <87vc8ke4os.fsf@mail.jurta.org> <86zgmutwx9.fsf@mail.linkov.net> <87o83ab67d.fsf@web.de> <86r185520f.fsf@mail.linkov.net> <87czjn39yf.fsf@web.de> <86y2215rbn.fsf@mail.linkov.net> <87ee3tjecw.fsf@web.de> <87pmnap75m.fsf@web.de> <86mtha7y8w.fsf@mail.linkov.net> <877d8935sf.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31855"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Stefan Monnier , 14013@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 01 18:45:33 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1naKOx-00088P-0H for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 18:45:31 +0200 Original-Received: from localhost ([::1]:50884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naKOv-0000hz-Km for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 12:45:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naKOU-0000fE-E9 for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 12:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49372) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naKOU-0004qw-4n for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 12:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naKOU-0005X9-1d for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 12:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Apr 2022 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14013 X-GNU-PR-Package: emacs Original-Received: via spool by 14013-submit@debbugs.gnu.org id=B14013.164883144721193 (code B ref 14013); Fri, 01 Apr 2022 16:45:02 +0000 Original-Received: (at 14013) by debbugs.gnu.org; 1 Apr 2022 16:44:07 +0000 Original-Received: from localhost ([127.0.0.1]:43269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naKNa-0005Vl-M9 for submit@debbugs.gnu.org; Fri, 01 Apr 2022 12:44:06 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:37193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naKNZ-0005Uy-AO for 14013@debbugs.gnu.org; Fri, 01 Apr 2022 12:44:05 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 7A88F20000C; Fri, 1 Apr 2022 16:43:57 +0000 (UTC) In-Reply-To: <877d8935sf.fsf@web.de> (Michael Heerdegen's message of "Fri, 01 Apr 2022 04:18:24 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229231 Archived-At: > 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"?