From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59888: [PATCH] Add 'grep-heading-mode' Date: Thu, 08 Dec 2022 12:57:59 +0200 Message-ID: <83leni2mdk.fsf@gnu.org> References: <87v8mndrla.fsf@gmail.com> <837cz33wup.fsf@gnu.org> <87mt7ye0e5.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23663"; mail-complaints-to="usenet@ciao.gmane.io" 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 Thu Dec 08 11:59:48 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 1p3Ed0-0005rU-G4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 11:59:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3EcQ-0003jo-BP; Thu, 08 Dec 2022 05:59:10 -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 1p3EcN-0003fy-Q3 for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 05:59:07 -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 1p3EcI-0000ba-Ox for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 05:59:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3EcI-0000Ki-Do for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 05:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 10:59:02 +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.16704970961262 (code B ref 59888); Thu, 08 Dec 2022 10:59:02 +0000 Original-Received: (at 59888) by debbugs.gnu.org; 8 Dec 2022 10:58:16 +0000 Original-Received: from localhost ([127.0.0.1]:56036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3EbX-0000KI-W7 for submit@debbugs.gnu.org; Thu, 08 Dec 2022 05:58:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3EbW-0000KA-ON for 59888@debbugs.gnu.org; Thu, 08 Dec 2022 05:58:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3EbR-0000X1-D6; Thu, 08 Dec 2022 05:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S8nlamNELQqpaVbxb7uHtUsU5w1+v3A8ld1lgUwUfaU=; b=Tz6NxsXxZ9AB W0m9oPV4yNzMUztKGz0kdi5r/fMYQH8Nvu7AkPgfRguWRQaYrgQia/NKI8oQYNfjoHCpj91R29K4u Pz8MUIfcwJu6AZ78cmf1uCA78eOlG+gSXzHB1eCZ27HNdqhNiMnAbYOM+7FPGWwsR8QsVabYjpuCc d6DjGg2hd+4SpQesfCXcgps/00kFtrj2CDE3pt5aUFuvGgHv9dNBQ9d5N30JyQG5Vi/Gr5awiRUDe 0tZ3pDeqDsP3XwN/YSw2MkyRCl55+sP6OUazg5OeRPTIEOwcVaLZYHAhOFOUiWAMJfPCfcDvn9DLR vNhN6HDD+YEaX2DMfns3cg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3EbQ-00054t-OJ; Thu, 08 Dec 2022 05:58:09 -0500 In-Reply-To: <87mt7ye0e5.fsf@gmail.com> (message from Augusto Stoffel on Thu, 08 Dec 2022 09:59:46 +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:250269 Archived-At: > From: Augusto Stoffel > Cc: 59888@debbugs.gnu.org > Date: Thu, 08 Dec 2022 09:59:46 +0100 > > On Wed, 7 Dec 2022 at 20:14, Eli Zaretskii wrote: > > >> From: Augusto Stoffel > >> Date: Wed, 07 Dec 2022 18:57:37 +0100 > >> > >> +(defcustom grep-heading-regexp > >> + (rx bol > >> + (or > >> + (seq "Grep" (* (any "/a-zA-Z")) " " > >> + (or "started" "finished" "exited" "interrupt" "killed" "terminated") > > > > Cannot these be translated to languages other than English in > > localized versions of Grep? > > AFAICT these messages are generated by Emacs itself. All of them? > We could also use "^Grep[/a-zA-Z]* [^\0t\]*$" here The [/a-zA-Z] part is still ASCII-only, and I believe the "/" part means you want to support file names? then for Windows we also need the colon ':'. > >> 2. One could get rid of the awkward first alternative of > >> `grep-heading-regexp' if there was a way to distringuish the grep > >> process output from the header and footer added by grep-mode. > > > > You could put a special text property on the latter, no? > > That's an option and it would be useful for other extensions as well. > So we would define something like > > --8<---------------cut here---------------start------------->8--- > (defun compilation-insert-note (&rest args) > (let ((start (point))) > (apply #'insert args) > (put-text-property start (point) 'compilation-note t))) > --8<---------------cut here---------------end--------------->8--- > > and use throughout compile.el, right? Yes, something like this.