From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find multiline regexps Date: Sun, 29 Nov 2020 04:30:14 +0200 Message-ID: References: <10120030-8b8d-b702-add4-8f099f934ed5@chalmers.se> <91c98791-9df2-43ee-9aac-205c5b0de9c2@default> <87blfm6922.fsf@mail.linkov.net> <838saqtsm9.fsf@gnu.org> <87mtz64htw.fsf@mail.linkov.net> <831rgitqe2.fsf@gnu.org> <87y2iqnhh2.fsf@mail.linkov.net> <83k0u9sais.fsf@gnu.org> <87d0016w6n.fsf@mail.linkov.net> <83v9dtqiw1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29068"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: abela@chalmers.se, 31796@debbugs.gnu.org To: Eli Zaretskii , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 29 03:31:11 2020 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 1kjCUZ-0007TP-4P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Nov 2020 03:31:11 +0100 Original-Received: from localhost ([::1]:47734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjCUX-0001Y9-OL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Nov 2020 21:31:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjCUQ-0001Y1-8J for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 21:31:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjCUP-00060o-W8 for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 21:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjCUP-0007zJ-Rz for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2020 21:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Nov 2020 02:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31796 X-GNU-PR-Package: emacs Original-Received: via spool by 31796-submit@debbugs.gnu.org id=B31796.160661702830658 (code B ref 31796); Sun, 29 Nov 2020 02:31:01 +0000 Original-Received: (at 31796) by debbugs.gnu.org; 29 Nov 2020 02:30:28 +0000 Original-Received: from localhost ([127.0.0.1]:49418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjCTs-0007yQ-IH for submit@debbugs.gnu.org; Sat, 28 Nov 2020 21:30:28 -0500 Original-Received: from mail-ed1-f52.google.com ([209.85.208.52]:38100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjCTn-0007y8-S2 for 31796@debbugs.gnu.org; Sat, 28 Nov 2020 21:30:26 -0500 Original-Received: by mail-ed1-f52.google.com with SMTP id y4so10246581edy.5 for <31796@debbugs.gnu.org>; Sat, 28 Nov 2020 18:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DiNZ04GolJswS8WNgEuAGrkedsJiBu91y/fSXJ4TD+Q=; b=jYGy9DNOj4PdWTm5DEvB9IAJkdCPyuKnfBWJvxwhXUyFWPdtEcS3QHka2VRWB5M4K4 E9fcKB3JJlTICh0hXZgYFBY3SLBmoBNYu/09ovaD6D3hOVCRB/y6oAMZAzzg8Q8KJSpH mqUKyhcW+qiIvDrOmjvdUMjRyyaTvXsKk6+jB0R8W1mC+TpBmXGxXhsI9PG/dWrlaYNJ QZWjGR8AKGA/prdyQnIzjdLlVraarLbjPmaVtC+l6U7JMP2GGdW0KgQ0qG70uYpXK8zD 7QSuk2V1dMCkKw55ADaz+hEZ8220zDEZhZgOUGs26aokday9mCAL5fusq+5FRnf6FgWV r68g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DiNZ04GolJswS8WNgEuAGrkedsJiBu91y/fSXJ4TD+Q=; b=okazbbwmIdKbeLB9lgRd7rnW1v1gJ7vuRMNPmLs++xrtKCp0anB3yPTFiyrv7m5IaT tAJjoezLSToDgT+SdrX5YePeaKIQGpi7mu5FxrLYChuphnKyc+VWlOi3AePs2qYJUemw kSS5KjNkHmyx/jSvlhvVPNK1KK7a2JUx5svDnQ2iFcPzKEXzMLoOeT8vQm+UVppN8zUb gQOj5hAE11woKNyaajES1cunsmGDPO42MzYl53JRiZBiVLqNFQSP3Zgqe5dF2b1fqCfF jLQsZVyLuFmac0A9ALpuwmBayGktAagN9iooays0TlmoaVpd1OF+VCRI99P5nrR+iwBp zz8A== X-Gm-Message-State: AOAM532U3RG1m5qyc4o7Lg4OWbjkNbp+cYA6qY+Cx9OqTjCN/70OTlTv dd8IX0/pXg8KQgDbEzA/WyHCiI3xB0GSvA== X-Google-Smtp-Source: ABdhPJy4WmRnk+5vMhmuKJfYx775ef+p4eiFFAfwcR5Oubz0H+nRoj6sUJL521fO+JPWUCT+RxM3xw== X-Received: by 2002:a50:8004:: with SMTP id 4mr13062178eda.329.1606617017321; Sat, 28 Nov 2020 18:30:17 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id ba7sm7146971edb.55.2020.11.28.18.30.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Nov 2020 18:30:16 -0800 (PST) In-Reply-To: <83v9dtqiw1.fsf@gnu.org> Content-Language: en-US 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:194522 Archived-At: On 25.11.2020 22:30, Eli Zaretskii wrote: > I'd like us to fix the current binding of Q so that it supports > everything the previous command did. Just how much of "everything" are we talking about? For instance, a number of character classes in Emacs regexps are dependent on the syntax table. Like [:word:], for instance. Even [:space:] is dependent on syntax, while it matches a fixed set of characters in Grep. So when searching across different file types we can't even "expand" such constructs into concrete characters to search for. One approach I've considered is replacing such unsupported constructs with '.', or removing them entirely for constructs like \< and \_<. And then post-filter the resulting matches in Emacs. For example, xref-references-in-directory uses a special case of this approach. In the general case though, I worry users would sometimes create regexps that result in an exponentially slow or just match-all regexp being passed to Grep, which would never finish, for no obvious reason. Someone should try it, but it's a fair amount of work to handle all supported constructs, and to catch all (most?) the regexps which we can't support in this mode.