From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Simon Lang Newsgroups: gmane.emacs.bugs Subject: bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization Date: Sat, 13 Jun 2020 09:51:29 +0000 Message-ID: References: <87h7vkihci.fsf@tcd.ie> <833674710g.fsf@gnu.org> <87bllqoag3.fsf@mail.linkov.net> <85a777f6-cf5e-9a05-7156-35a295713b89@yandex.ru>, <87pna6ldoi.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107043"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , "41766@debbugs.gnu.org" <41766@debbugs.gnu.org> To: Juri Linkov , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 13 11:52:10 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 1jk2pe-000RlM-PS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 11:52:10 +0200 Original-Received: from localhost ([::1]:54862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jk2pd-0008LL-S2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 05:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk2pW-0008IR-4w for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 05:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jk2pV-0007Dn-Qb for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 05:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jk2pV-0001Ok-PJ for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2020 05:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simon Lang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jun 2020 09:52:01 +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.15920418985347 (code B ref 41766); Sat, 13 Jun 2020 09:52:01 +0000 Original-Received: (at 41766) by debbugs.gnu.org; 13 Jun 2020 09:51:38 +0000 Original-Received: from localhost ([127.0.0.1]:40876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jk2p7-0001OA-Qb for submit@debbugs.gnu.org; Sat, 13 Jun 2020 05:51:38 -0400 Original-Received: from mail-oln040092070095.outbound.protection.outlook.com ([40.92.70.95]:14638 helo=EUR03-AM5-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jk2p6-0001Nx-K0 for 41766@debbugs.gnu.org; Sat, 13 Jun 2020 05:51:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hLfFWz8MZ9NsclIeLMqmOWfcIijwixAxrxCi0HcW3EA5r8xMOcbcBTwhPVX8vxGHYdwApYH9u7XZUaQogwFpAYCBhgCnhkFL2HYMVW9Y0bP8NdON/MVmsxYERnWzraALjt38LdJ0a3Wqd4MzairPkznT0kid3xoMK8YeB2UTJYZ7lXfMy/O5en0uQcu7jiuFtHeHikuAq25vFZQVHnyylpwoyfc6U/WrPqbSc9rMNmz1/f2OefT9sWbUevsCRHrPewO9NK4zBu2HXCoO1iprTUmHIYRaRC8GDm4Sy00ZHKkE/H0cLiJf1S3a3q/tKgRGF8ffQkAHw+xL6JB6H6zJFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=weZONuPxFqK7yvC73x0hqkQfqOpIbyaenedNFp9ADdk=; b=Kx7sYxiejZ7bxWO5rW58hjKnPAI9Wkcag6B0WKsqGN8V2gJr3J+QNtgIKbL58WLGOdrM4Sr6zTjizHxbR0Nhqj2a+I11gIu2nobJCf+h7+xpVE1ua3/6J3SZpNSFg1HqUCvGCKivLtvFCaa58Gf+/Gaiqb9sVjEQ2fgz3Pc5Fn3T4QWsSasj2roRLejOvg2PhY4aLBnoQi2hqQEPw2vlDKO9VbVZrwA9GLllc6qn6cYSgtFBZ4n00PumXRdzlNbw0cLMmJWiAzyZLX2GxnmgtGe4V/uhU2fCkEK9qTuh11Y+LX/AKYrKttkHGi24Hex9bQXiWmwOnXu7OH8nttPE0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=weZONuPxFqK7yvC73x0hqkQfqOpIbyaenedNFp9ADdk=; b=Y5uWYuEsbItsjXmJDWk6UyT8wI0BJPAReQ3Lh4mwSdGt0CGQIWoEWJYou0uNJxAY0u6S94nGhdAPVCYt9ttg59RIZyHLoRMNk9YJH/Q2az+J8CHtmXyHa9Sc0SuHB5wasYYFzXoSK2j3I6BV1x20Ds1zOjf20HRWilN/SV5G9du0EmYcvhwXTHYVf2n20JrQaAykZVGERoH7PIFP2k3kXisxrFD7wYFXMdnaaNYlDPQxdys9Dum9BZGDFS1r/AyoMrY/wbcK2GXOIMOq65o215158EG8vmfSzYTpRI6VYhpSmHu4+hjlGOu2wO/XeCCtGz6VFijVi6tnwkAk+TQ2ug== Original-Received: from VE1EUR03FT019.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e09::40) by VE1EUR03HT157.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e09::228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Sat, 13 Jun 2020 09:51:29 +0000 Original-Received: from VI1PR10MB2800.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:7e09::4f) by VE1EUR03FT019.mail.protection.outlook.com (2a01:111:e400:7e09::153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 09:51:29 +0000 Original-Received: from VI1PR10MB2800.EURPRD10.PROD.OUTLOOK.COM ([fe80::c45e:a27a:903e:c357]) by VI1PR10MB2800.EURPRD10.PROD.OUTLOOK.COM ([fe80::c45e:a27a:903e:c357%7]) with mapi id 15.20.3088.025; Sat, 13 Jun 2020 09:51:29 +0000 Thread-Topic: bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization Thread-Index: AQHWPc/RG0xiM+LeYUGktgGhL6/KlKjPcrmAgAB2jTSAAETYFYAALx5ggAH8/gyAAA4jgIAABP0AgAASkcOAA9QwlA== In-Reply-To: <87pna6ldoi.fsf@mail.linkov.net> Accept-Language: en-GB, en-US Content-Language: en-GB x-incomingtopheadermarker: OriginalChecksum:13BDF844D5B08E281F0472EF4AD2A43C00C6C084AD8F3C70335C584359AC8A43; UpperCasedChecksum:046753221F598FE9B3825C011D866714823CDB7EA9CD7ECE08AB600643A78FF8; SizeAsReceived:7545; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [D0NEp/zgNEWRhZV7moJD7FXwq5QDJ556] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 18533c50-5eea-4995-809d-08d80f7f58b3 x-ms-traffictypediagnostic: VE1EUR03HT157: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e9biFRxJ8dBbKNe4kbsm6NYVVOptg6B8DsPPbRgLzOuZrLzenw3y12T5tSm0rEookIhlkaFi1Qu68pcyeLYiokTetoAaSIeGugLEi+8lD45ALJo8RnKSLWRlEx8bwqUsiVu9a1Ot1cwxF2hfiZTq/9XcIAL2qZmCMF2roWKmS+IA8TfzF+gJ3IepvyvBunyZFvqVKmFGeekoyoJ5SSYj8A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR10MB2800.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; x-ms-exchange-antispam-messagedata: q5SePuOHSjc5bIIjOo7fek1BawWkVmKFqB2pgZJxXV+ZJWL4cVSUxkGPRzET5rwRxODBZbY4vnVh/7Q4gp1StsAx8pGM/+uUe4XCMNvmlgxiVGbKGpDlKLYI5wiIxx6Q8fS9gGZn7iWDvpomHuAXqg== x-ms-exchange-transport-forked: True X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 18533c50-5eea-4995-809d-08d80f7f58b3 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jun 2020 09:51:29.5467 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT157 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:181911 Archived-At: Maybe also a way to easily register new search tools? Otherwise one might b= e locked into the available options again - and if there is a new tool the = interface might be not that stable, so there is the danger that it breaks u= ntil there is a new emacs release. Simon ________________________________________ From: Juri Linkov Sent: 11 June 2020 00:10 To: Dmitry Gutov Cc: Simon Lang; Basil L. Contovounesios; 41766@debbugs.gnu.org Subject: Re: bug#41766: Make it possible to change regexp to identify and h= ighlight grep matches via customization >> In the long run what should be customizable is not escape sequences, >> but a choice of the grep program with a list of such options: >> "GNU grep" >> "ripgrep" >> ... > > That could simply be done by adding :tag to each option value, right? Indeed, the same way as it's already used in (defcustom grep-find-use-xargs nil "How to invoke find and grep. If `exec', use `find -exec {} ;'. If `exec-plus' use `find -exec {} +'. If `gnu', use `find -print0' and `xargs -0'. If `gnu-sort', use `find -print0', `sort -z' and `xargs -0'. Any other value means to use `find -print' and `xargs'. This variable's value takes effect when `grep-compute-defaults' is called." :type '(choice (const :tag "find -exec {} ;" exec) (const :tag "find -exec {} +" exec-plus) (const :tag "find -print0 | xargs -0" gnu) (const :tag "find -print0 | sort -z | xargs -0'" gnu-sort) string (const :tag "Not Set" nil)) :set #'grep-apply-setting :version "27.1")