GNU bug report logs - #20728
25.0.50; grep and grep-find templates should have a place holder for the --color argument

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 3 Jun 2015 23:44:01 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 20728 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 20728 <at> debbugs.gnu.org
Subject: Re: bug#20728: 25.0.50;
 grep and grep-find templates should have a place holder for the
 --color argument
Date: Fri, 05 Jun 2015 01:50:34 +0300
> And fill it in dynamically during expansion.
>
> This way, the caller can set grep-highlight-matches dynamically, without
> recomputing grep defaults (which is expensive). This is particularly
> relevant on MS-Windows, in semantic-symref-grep-use-template and
> xref-collect-matches.

I guess you need reusing the grep command line for purposes
other than highlighting its matches in the output buffer, right?
Then indeed since on Windows grep fails `isatty' detection
we had to use "--color=always" instead of "--color=auto".
Some time ago additional grep options (including "--color=auto")
were set in env GREP_OPTIONS were they could be easily changed,
but not anymore after 2e4c2fe2787785a421f256541de642976e9bd90b.
So maybe now we should add a place holder for grep options
in the template and use it the same way as we used GREP_OPTIONS.




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

Previous Next


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