From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49978: 28.0.50; grep-highlight-matches auto-detection broken on macOS [PATCH] Date: Tue, 10 Aug 2021 16:23:05 +0300 Message-ID: <83tujxfn7q.fsf@gnu.org> References: <6D6B9A78-50EC-4AEC-80AA-EB12C608EB48@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49978@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 10 15:24:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDRjp-0008sG-4j for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 15:24:13 +0200 Original-Received: from localhost ([::1]:43358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDRjn-0000CA-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 09:24:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDRje-000095-N0 for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 09:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDRje-0002Lm-Gd for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 09:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDRje-0006Nn-4f for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 09:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Aug 2021 13:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49978 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49978-submit@debbugs.gnu.org id=B49978.162860178424460 (code B ref 49978); Tue, 10 Aug 2021 13:24:02 +0000 Original-Received: (at 49978) by debbugs.gnu.org; 10 Aug 2021 13:23:04 +0000 Original-Received: from localhost ([127.0.0.1]:58738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDRih-0006MS-Ng for submit@debbugs.gnu.org; Tue, 10 Aug 2021 09:23:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDRif-0006Ll-K0 for 49978@debbugs.gnu.org; Tue, 10 Aug 2021 09:23:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48820) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDRia-0001mY-1A; Tue, 10 Aug 2021 09:22:56 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4204 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDRiZ-0000CX-Kn; Tue, 10 Aug 2021 09:22:55 -0400 In-Reply-To: <6D6B9A78-50EC-4AEC-80AA-EB12C608EB48@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Tue, 10 Aug 2021 14:54:43 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211487 Archived-At: > From: Mattias EngdegÄrd > Date: Tue, 10 Aug 2021 14:54:43 +0200 > > The auto-detection of colourised grep fails on macOS (and presumably BSD in general) because grep --help exits with a nonzero status (while still printing a useful option summary). > > We should just ignore the exit status. Anyone against the attached patch? Not me (this time ;-). Although perhaps we should strengthen the search string to be sure we don't hit some false positive: "--color" sounds a bit too general, no? Or do you think it's good enough even if "--help" causes a non-zero exit code?