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#59888: [PATCH] Add 'grep-use-headings' Date: Tue, 28 Feb 2023 19:24:58 +0200 Organization: LINKOV.NET Message-ID: <86r0u9oj4p.fsf@mail.linkov.net> References: <87v8mndrla.fsf@gmail.com> <87ilime025.fsf@gmail.com> <86359pm55x.fsf@mail.linkov.net> <87o7scdb45.fsf_-_@gmail.com> <837cz0z7wj.fsf@gnu.org> <87k0301h16.fsf@gmail.com> <831qp8z5gp.fsf@gnu.org> <87sfhn3tui.fsf@gmail.com> <83wn6zui9n.fsf@gnu.org> <87ilii41p9.fsf@gmail.com> <867cytgk0k.fsf@mail.linkov.net> <871qme5ej3.fsf@gmail.com> <87cz5w7ehu.fsf@gmail.com> <87pm9wcvoe.fsf@gmail.com> <86y1oj9byf.fsf@mail.linkov.net> <87cz5vc4io.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35895"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 59888@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 28 18:35:43 2023 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 1pX3t8-0009DG-0W for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Feb 2023 18:35:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX3sX-0005xj-VE; Tue, 28 Feb 2023 12:35:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pX3sW-0005u1-JQ for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 12:35:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX3sW-0000Sy-Av for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 12:35:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pX3sW-0006nV-6Z for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 12:35:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Feb 2023 17:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59888 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59888-submit@debbugs.gnu.org id=B59888.167760566326022 (code B ref 59888); Tue, 28 Feb 2023 17:35:04 +0000 Original-Received: (at 59888) by debbugs.gnu.org; 28 Feb 2023 17:34:23 +0000 Original-Received: from localhost ([127.0.0.1]:51917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX3rr-0006lb-0e for submit@debbugs.gnu.org; Tue, 28 Feb 2023 12:34:23 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:48873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX3rl-0006kq-Iw for 59888@debbugs.gnu.org; Tue, 28 Feb 2023 12:34:18 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id C3C15240009; Tue, 28 Feb 2023 17:34:08 +0000 (UTC) In-Reply-To: <87cz5vc4io.fsf@gmail.com> (Augusto Stoffel's message of "Mon, 27 Feb 2023 20:06:07 +0100") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256996 Archived-At: > +(defvar grep-heading-regexp > + (rx bol > + (or > + (group-n 2 > + (group-n 1 (+ (not (any 0 ?\n)))) > + 0) > + (group-n 2 > + (group-n 1 (+? nonl)) > + (any ?: ?- ?=))) > + (+ digit) > + (any ?: ?- ?=)) I wonder what is the reason for this regexp to be different from grep-regexp-alist? Especially with such additional characters as ?- and ?=. This mismatch causes wrong handling of files when file names contain these characters.