GNU bug report logs -
#41766
Make it possible to change regexp to identify and highlight grep matches via customization
Previous Next
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
> Am 13.06.2020 um 23:59 schrieb Juri Linkov <juri <at> linkov.net>:
>
>
>>
>> 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.
>
> No problem, you can even dynamically add an option available only
> when a grep program is installed:
>
> (defcustom grep-program nil
> "The default grep program for `grep-command' and `grep-find-command'.
> This variable's value takes effect when `grep-compute-defaults' is called."
> :type `(choice (const :tag "GNU grep" (purecopy "grep"))
> ,@(if (executable-find "rg") '((const :tag "ripgrep" "rg")))
> (string :tag "Other grep program")
> (const :tag "Not Set" nil))
> :version "28.1")
>
> Or for a completely new tool:
>
> (nconc (get 'grep-program 'custom-type) '((const :tag "ripgrep" "rg")))
Maybe still fine to merge my patch now and look at this later? One would not contradict the other, I would think?
@Eli: sorry I hope my revised patch was not buried below this other discussion now.
Thank you!
Simon
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.