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: Mon, 8 Jun 2015 01:22:31 +0300 Message-ID: <5574C427.3070007@yandex.ru> References: <86bngws6il.fsf@yandex.ru> <83eglsqjkr.fsf@gnu.org> <5570132A.9060109@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> 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 1433715805 8245 80.91.229.3 (7 Jun 2015 22:23:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2015 22:23:25 +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 Mon Jun 08 00:23:11 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 1Z1iyE-0002gq-5H for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jun 2015 00:23:10 +0200 Original-Received: from localhost ([::1]:55328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1iyD-0006ab-GD for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jun 2015 18:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1iy9-0006aU-KL for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 18:23:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1iy6-00014E-EX for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 18:23:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1iy6-00014A-BI for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 18:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z1iy5-0002zU-PL for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 18:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jun 2015 22:23:01 +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.143371576311475 (code B ref 20728); Sun, 07 Jun 2015 22:23:01 +0000 Original-Received: (at 20728) by debbugs.gnu.org; 7 Jun 2015 22:22:43 +0000 Original-Received: from localhost ([127.0.0.1]:44370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1ixm-0002z0-DO for submit@debbugs.gnu.org; Sun, 07 Jun 2015 18:22:42 -0400 Original-Received: from mail-wi0-f181.google.com ([209.85.212.181]:37756) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1ixk-0002ym-HB for 20728@debbugs.gnu.org; Sun, 07 Jun 2015 18:22:41 -0400 Original-Received: by wifx6 with SMTP id x6so68023394wif.0 for <20728@debbugs.gnu.org>; Sun, 07 Jun 2015 15:22:35 -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=Ei34jdXqN3kJP0fNH/Xsw3+KK5CuiW3TY7VH+9S5s1Y=; b=P/FXAg0EgBCnTuXtsjJzfCNNxLIs4+rFqIpugKnERZAUfnAQY8Eyh/CUfAp2Np9ewM ROek5QYnEdxPDkLEKAGP1n06LfJlTobLgOPoH9lbaUYMYF0OaGSgoSyhEGGPqj/K2krO xkqMDrbR5L9v7vbsd1E2lJZOu9nqFcLYc8NUcfACXItIuJY8mif910WoR8+UV45bv4Hb edKOqex/Vx9DdN9aeLUBWjpf7wKpQNzNdJKGI2U0JqHwrl3vifoNK3mArZOPDYvdrWoD iw76NcOTJSsKdxEb5W2t3tsXHKAvAplWmil8VoEUMxzYZBRfJZp32SB6dke3qI7sVUP+ pkrg== X-Received: by 10.180.106.137 with SMTP id gu9mr16677118wib.54.1433715755034; Sun, 07 Jun 2015 15:22:35 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id r6sm8578918wiy.13.2015.06.07.15.22.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jun 2015 15:22:34 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <874mmkfq7q.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:103720 Archived-At: On 06/07/2015 01:04 AM, Juri Linkov wrote: > Thanks for mentioning zrgrep! I noticed that it's broken now and fixed > with the patch that let-binds grep-highlight-matches before calling > grep-compute-defaults since now it's computed here. No problem. Could you explain what those filters are, the ones the comment says zgrep puts into output? > String replacement is too unreliable approach. I meant template substitution, like in grep-expand-template. Not sure what to do about grep-default-command, but if leaving it as-is is not an option, we can reasonably decide that the grep-command was the symbol at the beginning of the previous command. > But I see no problem with > both zrgrep and the code where you want to parse the output programmatically, > to remember the computed command lines in defvar variables such as > zgrep-find-command, zgrep-find-template, etc. to not compute them every > time the command is called. Again, why have zgrep-find-template, when grep-find-template could have a (new) placeholder for grep-command? Do zgrep and grep take different options? > When parameters don't vary between command calls (as regexps and files do) > then I think it's better to prepare them in the command line templates. Since grep-command and grep-highlight-matches can vary between calls, should we make a template placeholder for them?