all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Augusto Stoffel <arstoffel@gmail.com>, 59888@debbugs.gnu.org
Subject: bug#59888: [PATCH] Add 'grep-heading-mode'
Date: Wed, 7 Dec 2022 16:19:30 -0800	[thread overview]
Message-ID: <CADwFkmk7eNxT7m0JMpY=M0EJs591SL3OtWjDTcys1Zn+O7rTDg@mail.gmail.com> (raw)
In-Reply-To: <87v8mndrla.fsf@gmail.com>

Augusto Stoffel <arstoffel@gmail.com> writes:

> From 2247f006845000032fedc3dda9a073b14043a270 Mon Sep 17 00:00:00 2001
> From: Augusto Stoffel <arstoffel@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.





  parent reply	other threads:[~2022-12-08  0:19 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 17:57 bug#59888: [PATCH] Add 'grep-heading-mode' Augusto Stoffel
2022-12-07 18:14 ` Eli Zaretskii
2022-12-08  8:59   ` Augusto Stoffel
2022-12-08 10:57     ` Eli Zaretskii
2022-12-08  0:19 ` Stefan Kangas [this message]
2022-12-08  9:06   ` Augusto Stoffel
2022-12-09  7:23     ` Juri Linkov
2022-12-09 11:58       ` Augusto Stoffel
2022-12-09 12:18       ` bug#59888: [PATCH] Add 'grep-use-headings' Augusto Stoffel
2022-12-09 19:36         ` Eli Zaretskii
2022-12-09 20:03           ` Augusto Stoffel
2022-12-09 20:29             ` Eli Zaretskii
2022-12-10 20:08               ` Augusto Stoffel
2022-12-10 20:16                 ` Eli Zaretskii
2022-12-11 11:30                   ` Augusto Stoffel
2022-12-15  8:05                     ` Juri Linkov
2023-02-25  8:34                       ` Augusto Stoffel
2023-02-25 18:00                         ` Juri Linkov
2023-02-26 13:17                         ` Robert Pluim
2023-02-26 15:07                           ` Augusto Stoffel
2023-02-27  6:24                             ` Robert Pluim
2023-02-27 11:26                               ` Augusto Stoffel
2023-02-27 16:51                                 ` Robert Pluim
2023-02-27 18:53                             ` Juri Linkov
2023-02-27 19:06                               ` Augusto Stoffel
2023-02-27 19:15                                 ` Juri Linkov
2023-02-28 17:24                                 ` Juri Linkov
2023-02-28 18:17                                   ` Augusto Stoffel
2023-03-01 17:52                                     ` Juri Linkov
2022-12-09 20:40             ` Gregory Heytings
2022-12-10 17:24             ` Juri Linkov
2022-12-08  9:57 ` bug#59888: [PATCH] Add 'grep-heading-mode' Mattias Engdegård
2022-12-08 10:28   ` Augusto Stoffel
2022-12-08 10:48     ` Mattias Engdegård
2023-02-27 14:18       ` Mattias Engdegård
2022-12-09  7:28 ` Juri Linkov
2022-12-09 11:58   ` Augusto Stoffel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmk7eNxT7m0JMpY=M0EJs591SL3OtWjDTcys1Zn+O7rTDg@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=59888@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.