GNU bug report logs - #41766
Make it possible to change regexp to identify and highlight grep matches via customization

Previous Next

Package: emacs;

Reported by: Simon Lang <simon.lang <at> outlook.com>

Date: Mon, 8 Jun 2020 21:32:02 UTC

Severity: normal

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Simon Lang <Simon.lang <at> outlook.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, "41766 <at> debbugs.gnu.org" <41766 <at> debbugs.gnu.org>, Simon Lang <simon.lang <at> yellowfrog.io>, Dmitry Gutov <dgutov <at> yandex.ru>
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
> 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")




This bug report was last modified 4 years and 240 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.