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: Sun, 28 Jun 2015 22:02:21 +0300 Message-ID: <559044BD.4030703@yandex.ru> References: <86bngws6il.fsf@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> <55787A1D.9080601@yandex.ru> <87wpzbaztk.fsf@mail.linkov.net> <55793756.9070505@yandex.ru> <87a8w53k8z.fsf@mail.linkov.net> <558F1186.50303@yandex.ru> <834mls7dvr.fsf@gnu.org> <558FAAE0.6020805@yandex.ru> <83381b7vez.fsf@gnu.org> 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 1435518202 15719 80.91.229.3 (28 Jun 2015 19:03:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Jun 2015 19:03:22 +0000 (UTC) Cc: 20728@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 28 21:03: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 1Z9HrD-0003w4-Jo for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 21:03:11 +0200 Original-Received: from localhost ([::1]:39665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9HrC-0003k1-Nn for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jun 2015 15:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Hr8-0003jw-VP for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2015 15:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9Hr4-0002fy-Mj for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2015 15:03:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9Hr4-0002ft-I8 for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2015 15:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z9Hr3-0006vN-Vs for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2015 15:03: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: Sun, 28 Jun 2015 19:03: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.143551815426579 (code B ref 20728); Sun, 28 Jun 2015 19:03:01 +0000 Original-Received: (at 20728) by debbugs.gnu.org; 28 Jun 2015 19:02:34 +0000 Original-Received: from localhost ([127.0.0.1]:60609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9Hqb-0006ub-OC for submit@debbugs.gnu.org; Sun, 28 Jun 2015 15:02:34 -0400 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:34830) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9HqZ-0006uP-V0 for 20728@debbugs.gnu.org; Sun, 28 Jun 2015 15:02:32 -0400 Original-Received: by wiga1 with SMTP id a1so54252284wig.0 for <20728@debbugs.gnu.org>; Sun, 28 Jun 2015 12:02:26 -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=tqTw+PclgCn8ba4sjU5z+J+TJZkliYhkPHZqWEEmONQ=; b=HH7g8LTtNj/9qIKGGAt1FiPdXF8sZn1M3+fNjP6BtAmgjrMeMZvAf19CxcBsJ3mwQ1 oAmwKXVqnMfRNZjILAFJ5Mp9QevRrBGNk+70erSgxkV/ABHMFJKr21iyvKmNNQkvbqPP 5z//FwCg72DfRHzs4fANoH9LpLWJLjSeXxOOvZJuSVO0kRO9NJnHFFPl057qzclRraw1 onL77+rCHIHVEBBKHFLYFZe3GKyf2RshQGraFgynoBsdRmVhMersvqo+InI5OTxDSfah apeE+FAcIkCRdq9W+qF7HXBBDqQ2tiURq4FS2FOyx3AGP6gymNUX5Ap/F1VzAQCO5V/x /6EA== X-Received: by 10.194.201.71 with SMTP id jy7mr22676312wjc.93.1435518146346; Sun, 28 Jun 2015 12:02:26 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id sc16sm22555052wjb.28.2015.06.28.12.02.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jun 2015 12:02:26 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <83381b7vez.fsf@gnu.org> 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:104447 Archived-At: On 06/28/2015 05:35 PM, Eli Zaretskii wrote: >>> Isn't it the other way around: Windows wants 'always' (except when it >>> doesn't, see below), while others want 'auto'? >> >> When will `always' not work for the others? > > I answered that below: No: when will a given command's behavior on other operating systems be wrong if it was just written to work on Windows (and thus uses either `always' or nil, not `auto')? >>> As to when you won't want 'always': it's when Grep is invoked as part >>> pf a pipeline, where it's not the last part, Do we have any such commands? If so, would it hurt them to have to bind `grep-highlight-matches' to nil? >>> or when the Lisp program >>> that invokes it wants to interpret the results, as opposed to showing >>> them to the user. Again, any such command will need to bind `grep-highlight-matches' to nil, to work on Windows. Or neutralize some other way the value `always' that it gets set to automatically, on Windows and DOS. >> I'd want `nil' in that case, right? > > In which case? And what do you mean by 'nil' in this context? We are > talking about the value of the --color= Grep option, don't we? In either case: when the pipeline ends with something other than Grep, or when we'll process the output programmatically, and don't need the ANSI codes. I'm talking about the value of `grep-highlight-matches'. >> And I'd have to specify it explicitly anyway, if I want >> compatibility with Windows. > > You lost me. See above. >> So, why do we use `auto'? > > My guess would be: because it mostly does what we want, AUTOmatically: > it produces SGR color sequences when Grep is run as a subprocess via a > pty, and does not produce them when Grep's output is a pipe. Do we even have Grep-related commands that use a pipeline that doesn't end with Grep?