From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov 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: Wed, 10 Jun 2015 20:55:41 +0300 Message-ID: <55787A1D.9080601@yandex.ru> References: <86bngws6il.fsf@yandex.ru> <838ubzqzz5.fsf@gnu.org> <55706C5F.6070903@yandex.ru> <833827qyg5.fsf@gnu.org> <55707074.8010607@yandex.ru> <83zj4fpjof.fsf@gnu.org> <557082F7.8020400@yandex.ru> <83wpzjpf6o.fsf@gnu.org> <55708EEA.6020400@yandex.ru> <83twunp9bf.fsf@gnu.org> <5570B30F.4090503@yandex.ru> <83oakuprpf.fsf@gnu.org> <55715DE3.6000405@yandex.ru> <83h9qmpm2s.fsf@gnu.org> <557166CE.4050906@yandex.ru> <83d21apkyg.fsf@gnu.org> <55717030.6010005@yandex.ru> <87a8wdhka7.fsf@mail.linkov.net> <5572C936.6070505@yandex.ru> <874mmkfq7q.fsf@mail.linkov.net> <5574C427.3070007@yandex.ru> <87fv608nl8.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1433958983 22494 80.91.229.3 (10 Jun 2015 17:56:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jun 2015 17:56:23 +0000 (UTC) Cc: 20728@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 10 19:56:12 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 1Z2kEV-0000pQ-Nk for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jun 2015 19:56:11 +0200 Original-Received: from localhost ([::1]:41661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2kEU-0001BO-Kk for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jun 2015 13:56:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2kEQ-0001B1-Q5 for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2015 13:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2kEN-0003AI-5S for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2015 13:56:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2kEN-00039q-23 for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2015 13:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z2kEM-0002oy-LG for bug-gnu-emacs@gnu.org; Wed, 10 Jun 2015 13:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jun 2015 17:56:02 +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.143395894710804 (code B ref 20728); Wed, 10 Jun 2015 17:56:02 +0000 Original-Received: (at 20728) by debbugs.gnu.org; 10 Jun 2015 17:55:47 +0000 Original-Received: from localhost ([127.0.0.1]:47439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z2kE6-0002oB-Ap for submit@debbugs.gnu.org; Wed, 10 Jun 2015 13:55:46 -0400 Original-Received: from mail-wi0-f174.google.com ([209.85.212.174]:37054) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z2kE3-0002ny-H6 for 20728@debbugs.gnu.org; Wed, 10 Jun 2015 13:55:44 -0400 Original-Received: by wifx6 with SMTP id x6so55281955wif.0 for <20728@debbugs.gnu.org>; Wed, 10 Jun 2015 10:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=3ZMoBkR1MyQ30CV5vRNiAd6stnQbQBx4zD8HJk7qIgI=; b=P4p5BOUWsrHBtn9SekGR5jQU/FeTYbgAu5bW66IqKbnteMxbq8WNgJtblUNARKlmW0 6LChhteI/VTSki+8cReH9Y8QHtSLBFxKs6t5Gfa3GzHNla20MkzFaVEIz3PWOj6eknnv 1iAphleqM0W5oYGlOsBOV9AYNggJeEEWWhRs6WhERKXYJS30FDQBpFTostLj4bpg0VeI cqDOFf39fmxCbmup4eX89pVZ87n0ytIQa7uggvzshZrLOJh88D9KwX4IANOp1F56MJvo Jw1CB5WvciLNkyYphZNmoy5S47Xeg0bk9hU8P3EJMy5wR8kmWdzMyJhNyeVQBHcg6fBM bApQ== X-Received: by 10.180.102.227 with SMTP id fr3mr20944980wib.19.1433958942815; Wed, 10 Jun 2015 10:55:42 -0700 (PDT) Original-Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id hn7sm15596919wjc.16.2015.06.10.10.55.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jun 2015 10:55:42 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <87fv608nl8.fsf@mail.linkov.net> 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:103797 Archived-At: On 06/10/2015 02:32 AM, Juri Linkov wrote: > These are pipe filters. You can see how complex is the command line > constructed in /bin/zgrep I see, thanks. Apparently, the upshot is that --color=auto doesn't work. The nil value of grep-highlight-matches should still work, though. > Then you want two additional placeholders: for the command name and options? Yep! By the way, is already used to conditionally pass '-i'. We can reuse it to pass one more option. So, minus one new placeholder. > In an older version of /bin/zgrep I see the text "OPTIONs are the same as for 'grep'." > I don't know about other versions. Let's try it, then. > There are only two possible values for grep-highlight-matches > whereas the number of possible values of the current placeholders > for regexps and filenames is infinite. Right. That means that you can't precompute regexps and filenames, at all. That does not, however, mean that you *have to* precompute everything else. > I think the rule should be the following: placeholders are needed only for > parameters provided by users, but for internal implementation parameters > it's enough to pre-compute command lines (and cache them). Even if "internal" parameters vary between commands that use the same template? I disagree. If we can expand those parameters dynamically, we should. By the way, `grep-highlight-matches' is an option that the user can change via Customize, but the setter only calls `grep-apply-setting'. > PS: Somehow reminds me of endless discussions about distinctions > between `error' and `user-error' :) I don't remember, but `user-error' won, hasn't it? The main question now regarding it, is find and change all applicable uses of `error'.