From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization Date: Tue, 09 Jun 2020 15:32:01 +0100 Message-ID: <87y2owgvj2.fsf@tcd.ie> References: <87h7vkihci.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="79675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "41766@debbugs.gnu.org" <41766@debbugs.gnu.org>, Dmitry Gutov , Juri Linkov To: Simon Lang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 09 16:37:48 2020 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 1jifNr-000Kbx-SL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jun 2020 16:37:47 +0200 Original-Received: from localhost ([::1]:54060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jifNq-0002O1-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jun 2020 10:37:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jifJG-0005kx-PH for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2020 10:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jifJG-0002pN-F4 for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2020 10:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jifJG-0002TN-AX for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2020 10:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jun 2020 14:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41766 X-GNU-PR-Package: emacs Original-Received: via spool by 41766-submit@debbugs.gnu.org id=B41766.15917131329441 (code B ref 41766); Tue, 09 Jun 2020 14:33:02 +0000 Original-Received: (at 41766) by debbugs.gnu.org; 9 Jun 2020 14:32:12 +0000 Original-Received: from localhost ([127.0.0.1]:60544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jifIS-0002SC-3S for submit@debbugs.gnu.org; Tue, 09 Jun 2020 10:32:12 -0400 Original-Received: from mail-wm1-f66.google.com ([209.85.128.66]:53744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jifIQ-0002Rz-F1 for 41766@debbugs.gnu.org; Tue, 09 Jun 2020 10:32:11 -0400 Original-Received: by mail-wm1-f66.google.com with SMTP id l26so3033496wme.3 for <41766@debbugs.gnu.org>; Tue, 09 Jun 2020 07:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6U/ALbeLlWzAiEYXywZKhl+9NZ7dnun2Q+bg4cMNI98=; b=SbIdKFReMjy6bNEOKG1EHjG0ELpE6LQl93CWGqHIwXxW5Zn25mNr5H54EJ+DkQ5qow RFbWOcE0Lz56s4pU5i+B2CICqtBeeHVxBiN38DAVXzRalibmvCnGhDptbY60LTpG2SQ1 WqkVr+aFp/FvKF3rtEwefLJp/6nSdXV7+lVlgyWEPRBSJCIQqDe+vm7TuCJSnDIQ0pCK CdiRX5eHzcKV3gWLvSMUiLY9NQqh5Jj2p9KARfZx4vhpJ7YKogsW36cDe/2K5V3ydS5S jMn2LbVCMbT1SjzL0lUQk8aHUn/cbcmuGT1vZldyfaNJJFTq7nvbWrrZyseXpeNeYjcL Ox4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=6U/ALbeLlWzAiEYXywZKhl+9NZ7dnun2Q+bg4cMNI98=; b=tFiOfIdLzy1b1QuRcD73IvD0HbLGvlSqOyXbg3karnxkEbh1V1SkG9VmONLEneMETe qK+H41SBimgJRpT1ghXiQIF1VAnOWwn4uFoSiBxlFkgpmQF8lG25qv90ujZ72tnCfcqy v4syhIrk7/w/vM6ATu5ZlKQOO1CdVxwj+mnKiVDECOWaRNQ4kGpBLiJ4n32aB95SerKr aokBy3CHmwT6kb8JPbIH98/dTp4vilVbc9rOuVbXsvl9LZIkPlTS64tjcWol9hzA7Hc+ gZ73vhxnveazcQdc+bkkD3yidoNBdRliW1bDuup0E4jSf+4GJ27wznjprUeyYEfbRaBg XRXg== X-Gm-Message-State: AOAM531dBJUb1GvdJ5fec0fg46CkoJBmL4zQyvrV0R+6QytHOb1ALNfC qeDIh9sdW2xGF1iB54arrBzCDA== X-Google-Smtp-Source: ABdhPJwhToXuO2NZFYkbm8ri2GFWal8r8qk2FayuQ1HdeUGTTDJjKz3g9q9Hajph37eSDemlhHbT9w== X-Received: by 2002:a05:600c:2945:: with SMTP id n5mr4679844wmd.189.1591713123683; Tue, 09 Jun 2020 07:32:03 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id r4sm3582214wro.32.2020.06.09.07.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 07:32:02 -0700 (PDT) In-Reply-To: (Simon Lang's message of "Tue, 9 Jun 2020 12:45:18 +0000") 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:181782 Archived-At: Simon Lang writes: > I am happy with defvar instead (attached - I changed the commit message > accordingly). I admit it would not be straight forward to customize anyway > without doing some research. Thanks, just some convention tips from me. > From 724d83a211aae922b719a28cc4f9cc75d88cc4ee Mon Sep 17 00:00:00 2001 > From: Simon Lang > Date: Tue, 9 Jun 2020 13:38:07 +0100 > Subject: [PATCH] Remove hardcoding of regexp used to highlight grep matches. > > * lisp/progmodes/grep.el See etc/CONTRIBUTE for commit message conventions. In particular, it should list the definitions being changed, e.g.: * lisp/progmodes/grep.el (grep-match-regexp): New variable. (grep-filter): Use it. > --- > lisp/progmodes/grep.el | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el > index 7731be5965..618c2935f0 100644 > --- a/lisp/progmodes/grep.el > +++ b/lisp/progmodes/grep.el > @@ -353,6 +353,10 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies > (defvar grep-match-face 'match > "Face name to use for grep matches.") > > +(defvar grep-match-regexp "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" > + "Regular expression matching grep markers to highlight, used > +in `grep-filter'.") The first sentence of every docstring should fit on one line; see (info "(elisp) Documentation Tips"). So you could move the mention of grep-filter into a sentence of its own. -- Basil