From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: 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 Organization: LINKOV.NET Message-ID: <87d21bxf45.fsf@mail.linkov.net> References: <86bngws6il.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433458411 3158 80.91.229.3 (4 Jun 2015 22:53:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Jun 2015 22:53:31 +0000 (UTC) Cc: 20728@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 05 00:53:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z0e0e-0002gF-OE for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2015 00:53:12 +0200 Original-Received: from localhost ([::1]:44417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0e0d-00079F-Un for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jun 2015 18:53:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0e0Z-00078W-RB for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2015 18:53:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0e0V-0000hG-Re for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2015 18:53:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0e0V-0000h8-O7 for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2015 18:53:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z0e0V-0006Hd-5l for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2015 18:53:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jun 2015 22:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20728 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20728-submit@debbugs.gnu.org id=B20728.143345838124143 (code B ref 20728); Thu, 04 Jun 2015 22:53:03 +0000 Original-Received: (at 20728) by debbugs.gnu.org; 4 Jun 2015 22:53:01 +0000 Original-Received: from localhost ([127.0.0.1]:40913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0e0S-0006HI-4w for submit@debbugs.gnu.org; Thu, 04 Jun 2015 18:53:00 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:45196 helo=homiemail-a12.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0e0O-0006H7-Cx for 20728@debbugs.gnu.org; Thu, 04 Jun 2015 18:52:57 -0400 Original-Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 0B673103006C; Thu, 4 Jun 2015 15:52:55 -0700 (PDT) Original-Received: from localhost.linkov.net (m91-129-112-87.cust.tele2.ee [91.129.112.87]) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPA id ED8AC1030063; Thu, 4 Jun 2015 15:52:53 -0700 (PDT) In-Reply-To: <86bngws6il.fsf@yandex.ru> (Dmitry Gutov's message of "Thu, 04 Jun 2015 02:42:58 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103582 Archived-At: > 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.