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: Juri Linkov
Subject: bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization
Date: Tue, 23 Jun 2020 02:50:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> I changed it to defcustom because this is how I currently use it and
> no one had strong feelings about it.
> Do you want me to change it to devfar again? Or is it fine as it is?

If you don't want to change it to devfar in your patch, then for users
there should be an easy way to revert their customization to the default
value.  This would be possible by using such menu of possible values:

(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'."
  :type '(choice (regexp :tag "GNU grep" 
"\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m")
                 (regexp :tag "ripgrep" 
"\033\\[[0-9]*m\033\\[[0-9]*1m\033\\[[0-9]*1m\\(.*?\\)\033\\[[0-9]*0m")
                 (regexp :tag "Other grep programs"))
  :version "28.1")





reply via email to

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