GNU bug report logs - #59888
[PATCH] Add 'grep-heading-mode'

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Wed, 7 Dec 2022 17:58:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 59888 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>, 59888 <at> debbugs.gnu.org
Subject: Re: bug#59888: [PATCH] Add 'grep-heading-mode'
Date: Wed, 7 Dec 2022 16:19:30 -0800
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> From 2247f006845000032fedc3dda9a073b14043a270 Mon Sep 17 00:00:00 2001
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Date: Wed, 7 Dec 2022 18:44:07 +0100
> Subject: [PATCH] Add 'grep-heading-mode'
>
> New minor mode to subdivide grep output into sections, as in the
> '--heading' option of certain grep-like programs.
>
> * lisp/progmodes/grep.el (grep-heading-regexp): New user option.
> (grep-heading): New face.
> (grep--heading-format, grep--current-heading, grep--heading-filter):
> Filter function for grep processes and supporting variables.
> (grep-heading-mode): New minor mode.

How about making this into a defcustom instead of a minor mode?

I'm thinking that something like

    (setopt grep-use-headings t)

is a slightly simpler interface to use than

    (add-hook 'grep-mode-hook 'grep-heading-mode)

I also think the former plays a bit better with customize.




This bug report was last modified 2 years and 162 days ago.

Previous Next


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