bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41766: Make it possible to change regexp to identify and highlight g


From: Eli Zaretskii
Subject: bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization
Date: Sat, 13 Jun 2020 09:50:16 +0300

> From: Simon Lang <Simon.lang@outlook.com>
> CC: "41766@debbugs.gnu.org" <41766@debbugs.gnu.org>, "dgutov@yandex.ru"
>       <dgutov@yandex.ru>, "juri@linkov.net" <juri@linkov.net>
> Date: Wed, 10 Jun 2020 21:11:09 +0000
> 
> I now something to the manual, NEWS and changed the doc string + commit msg 
> as advised. I decided on defcustom in the end because this way it is easy for 
> the user to figure out what goes wrong in case he/she modifies grep-command 
> and highlighting is missing. Hope that is fine.
> 
> Pls let me know if there is anything else I need to change.

Thanks, a few minor comments below.

> +by grep.  The matching of the sequences is controlled by
> +@code{grep-match-regexp}, which can be customize to accommodate
> +different grep programs.               ^^^^^^^^^

Typo: should be "customized".

Also, "grep" should be "Grep".

> +** Grep changes:
> +
> +*** New variable 'grep-match-regexp' matches grep markers to highlight.
> +Grep emits SGR ANSI escape sequences to color its output. The new variable
> +'grep-match-regexp' holds the regular expression to match the appropriate
> +markers in order to provide highlighting in the source buffer. The variable
> +can be customized to accommodate other grep-like tools.

Please leave 2 spaces between sentences, per our conventions.
> +(defcustom grep-match-regexp "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m"
> +  "Regular expression matching grep markers to highlight.
> +It matches SGR ANSI escape sequences which are emitted by grep to
> +color its output. This variable is used in `grep-filter'."

Likewise here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]