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: Simon Lang
Subject: bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization
Date: Sat, 13 Jun 2020 09:51:29 +0000

Maybe also a way to easily register new search tools? Otherwise one might be 
locked into the available options again - and if there is a new tool the 
interface might be not that stable, so there is the danger that it breaks until 
there is a new emacs release.

Simon

________________________________________
From: Juri Linkov <juri@linkov.net>
Sent: 11 June 2020 00:10
To: Dmitry Gutov
Cc: Simon Lang; Basil L. Contovounesios; 41766@debbugs.gnu.org
Subject: Re: bug#41766: Make it possible to change regexp to identify and 
highlight grep matches via customization

>> In the long run what should be customizable is not escape sequences,
>> but a choice of the grep program with a list of such options:
>>    "GNU grep"
>>    "ripgrep"
>>    ...
>
> That could simply be done by adding :tag to each option value, right?

Indeed, the same way as it's already used in

(defcustom grep-find-use-xargs nil
  "How to invoke find and grep.
If `exec', use `find -exec {} ;'.
If `exec-plus' use `find -exec {} +'.
If `gnu', use `find -print0' and `xargs -0'.
If `gnu-sort', use `find -print0', `sort -z' and `xargs -0'.
Any other value means to use `find -print' and `xargs'.

This variable's value takes effect when `grep-compute-defaults' is called."
  :type '(choice (const :tag "find -exec {} ;" exec)
                 (const :tag "find -exec {} +" exec-plus)
                 (const :tag "find -print0 | xargs -0" gnu)
                 (const :tag "find -print0 | sort -z | xargs -0'" gnu-sort)
                 string
                 (const :tag "Not Set" nil))
  :set #'grep-apply-setting
  :version "27.1")





reply via email to

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