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:57:41 +0300 Message-ID: <83pmulflm2.fsf@gnu.org> References: <6D6B9A78-50EC-4AEC-80AA-EB12C608EB48@acm.org> <83tujxfn7q.fsf@gnu.org> <3E02EB6C-A3F9-482B-AEF3-50D68DAFAA0A@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="9414"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49978@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 10 15:58: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 1mDSGj-0002Bo-FL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 15:58:13 +0200 Original-Received: from localhost ([::1]:46364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDSGi-00086Z-AG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Aug 2021 09:58:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDSGY-00083J-Sn for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 09:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDSGY-0004uM-MU for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 09:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDSGY-0007Zj-FX for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2021 09:58: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:58: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.162860386129091 (code B ref 49978); Tue, 10 Aug 2021 13:58:02 +0000 Original-Received: (at 49978) by debbugs.gnu.org; 10 Aug 2021 13:57:41 +0000 Original-Received: from localhost ([127.0.0.1]:60133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSGD-0007Z9-4F for submit@debbugs.gnu.org; Tue, 10 Aug 2021 09:57:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSGB-0007Yx-9U for 49978@debbugs.gnu.org; Tue, 10 Aug 2021 09:57:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50056) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDSG5-0004W1-NI; Tue, 10 Aug 2021 09:57:33 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2369 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 1mDSG4-0007Ur-Fa; Tue, 10 Aug 2021 09:57:33 -0400 In-Reply-To: <3E02EB6C-A3F9-482B-AEF3-50D68DAFAA0A@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Tue, 10 Aug 2021 15:39:04 +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:211497 Archived-At: > From: Mattias EngdegÄrd > Date: Tue, 10 Aug 2021 15:39:04 +0200 > Cc: 49978@debbugs.gnu.org > > 10 aug. 2021 kl. 15.23 skrev Eli Zaretskii : > > > 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? > > I honestly don't know. The patch works here (obviously) but strengthening it using a regexp to avoid matching "--colorise", say, probably won't hurt. Not that it's very likely that this would ever make a difference, but if you think that it's better safe then sorry then I'll do that. I think just looking for "--color[[]?=" should go a long way towards avoiding false positives. WDYT? Lars, any comments? Btw, is this usage message translatable? If so, perhaps we should inject LC_ALL=C when running the probe?