GNU bug report logs -
#59888
[PATCH] Add 'grep-heading-mode'
Previous Next
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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
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.
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.