[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59888: [PATCH] Add 'grep-heading-mode'
From: |
Eli Zaretskii |
Subject: |
bug#59888: [PATCH] Add 'grep-heading-mode' |
Date: |
Thu, 08 Dec 2022 12:57:59 +0200 |
> From: Augusto Stoffel <arstoffel@gmail.com>
> 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 <arstoffel@gmail.com>
> >> 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.
- bug#59888: [PATCH] Add 'grep-heading-mode', Augusto Stoffel, 2022/12/07
- 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
- bug#59888: [PATCH] Add 'grep-use-headings', Eli Zaretskii, 2022/12/09
- bug#59888: [PATCH] Add 'grep-use-headings', Augusto Stoffel, 2022/12/10
- bug#59888: [PATCH] Add 'grep-use-headings', Eli Zaretskii, 2022/12/10