[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59888: [PATCH] Add 'grep-heading-mode'
From: |
Augusto Stoffel |
Subject: |
bug#59888: [PATCH] Add 'grep-heading-mode' |
Date: |
Wed, 07 Dec 2022 18:57:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Tags: patch
This simulates the --heading option of certain grep-like tools. The
output is like this:
--8<---------------cut here---------------start------------->8---
-*- mode: grep; default-directory: "~/Projects/emacs/" -*-
Grep started at Wed Dec 7 18:43:40
find [...] -exec grep --color=auto -i -nH --null -e test \{\} +
./nextstep/Makefile.in
104: find ${ns_appdir} -exec test \! -e {} \; -ls
./nextstep/INSTALL
12:Tested on GNU/Linux, may work on other systems.
./nextstep/Makefile
104: find ${ns_appdir} -exec test \! -e {} \; -ls
./nextstep/README
62: 10.6.8 (Snow Leopard) to the latest official release.
86:* This allows other Emacs developers to test their changes on the NS
--8<---------------cut here---------------end--------------->8---
0001-Add-grep-heading-mode.patch
Description: Text Data
Some comments:
1. It's necessary to insert text into the grep buffer, which is a bit
concerning because 'compilation-filter-start' is not a marker, just a
number. This could cause other filter functions to get confused.
This is why I'm adding to 'compilation-filter-hook at a higher depth.
Perhaps there are better approaches here.
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.
- bug#59888: [PATCH] Add 'grep-heading-mode',
Augusto Stoffel <=
- bug#59888: [PATCH] Add 'grep-heading-mode', Eli Zaretskii, 2022/12/07
- bug#59888: [PATCH] Add 'grep-heading-mode', Stefan Kangas, 2022/12/07
- bug#59888: [PATCH] Add 'grep-heading-mode', Augusto Stoffel, 2022/12/08
- bug#59888: [PATCH] Add 'grep-heading-mode', Juri Linkov, 2022/12/09
- bug#59888: [PATCH] Add 'grep-heading-mode', Augusto Stoffel, 2022/12/09
- bug#59888: [PATCH] Add 'grep-use-headings', Augusto Stoffel, 2022/12/09
- bug#59888: [PATCH] Add 'grep-use-headings', Eli Zaretskii, 2022/12/09
- bug#59888: [PATCH] Add 'grep-use-headings', Augusto Stoffel, 2022/12/09