From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 644cdd1: Use grep's --null option (Bug#6843) Date: Wed, 26 Jul 2017 20:54:45 +0200 Message-ID: <87mv7rm3ka.fsf@linux-m68k.org> References: <20170720000208.23054.66272@vcs0.savannah.gnu.org> <20170720000210.0E44020A56@vcs0.savannah.gnu.org> <10f1ac4b-aca5-53e9-5112-b8312471df82@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501095360 8156 195.159.176.226 (26 Jul 2017 18:56:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Jul 2017 18:56:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: Noam Postavsky , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 26 20:55:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daRTK-0001bb-0f for ged-emacs-devel@m.gmane.org; Wed, 26 Jul 2017 20:55:50 +0200 Original-Received: from localhost ([::1]:39626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daRTP-0007RV-R7 for ged-emacs-devel@m.gmane.org; Wed, 26 Jul 2017 14:55:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daRSQ-0007PS-Kk for emacs-devel@gnu.org; Wed, 26 Jul 2017 14:54:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daRSM-0008AH-0F for emacs-devel@gnu.org; Wed, 26 Jul 2017 14:54:54 -0400 Original-Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:46185) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daRSL-00086Z-QA for emacs-devel@gnu.org; Wed, 26 Jul 2017 14:54:49 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3xHkn31C73z1qrdS; Wed, 26 Jul 2017 20:54:47 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3xHkn30bzDz3hhTJ; Wed, 26 Jul 2017 20:54:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id MXadf9S3GrZ3; Wed, 26 Jul 2017 20:54:46 +0200 (CEST) X-Auth-Info: 1o3/N7jgoEuBHtpmeqPeok/Av7uaLfyi8PVBrlBt85dDqWM5CMiYjLAml0NMMSvz Original-Received: from igel.home (ppp-88-217-27-243.dynamic.mnet-online.de [88.217.27.243]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 26 Jul 2017 20:54:46 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 1000) id A39922C1B62; Wed, 26 Jul 2017 20:54:45 +0200 (CEST) X-Yow: My haircut is totally traditional! In-Reply-To: <10f1ac4b-aca5-53e9-5112-b8312471df82@yandex.ru> (Dmitry Gutov's message of "Wed, 26 Jul 2017 19:58:32 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:a60:0:28:0:1:25:1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217055 Archived-At: On Jul 26 2017, Dmitry Gutov wrote: >> +(defconst grep--regexp-alist-bin-matcher >> + '("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) >> +(defconst grep-with-null-regexp-alist >> + `(("^\\([^\0]+\\)\\(\0\\)\\([0-9]+\\):" 1 3 ,grep--regexp-alist-column nil nil > > Any reason to change 2 to 3? Why don't we use a non-capturing group for \0 > here? Why using a group at all? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."