all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Simon Lang <Simon.lang@outlook.com>
Cc: "41766@debbugs.gnu.org" <41766@debbugs.gnu.org>,
	Dmitry Gutov <dgutov@yandex.ru>, Juri Linkov <juri@linkov.net>
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	[thread overview]
Message-ID: <87y2owgvj2.fsf@tcd.ie> (raw)
In-Reply-To: <VI1PR10MB2800DF45CDE71860F46DA91180820@VI1PR10MB2800.EURPRD10.PROD.OUTLOOK.COM> (Simon Lang's message of "Tue, 9 Jun 2020 12:45:18 +0000")

Simon Lang <Simon.lang@outlook.com> 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 <simon.lang@outlook.com>
> 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





  reply	other threads:[~2020-06-09 14:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 20:25 bug#41766: Make it possible to change regexp to identify and highlight grep matches via customization Simon Lang
2020-06-08 23:18 ` Juri Linkov
2020-06-09  0:44 ` Dmitry Gutov
2020-06-09  7:58   ` Simon Lang
2020-06-09 11:55     ` Basil L. Contovounesios
2020-06-09 12:45       ` Simon Lang
2020-06-09 14:32         ` Basil L. Contovounesios [this message]
2020-06-09 14:43       ` Eli Zaretskii
2020-06-10 21:11         ` Simon Lang
2020-06-10 21:52           ` Juri Linkov
2020-06-10 22:14             ` Dmitry Gutov
2020-06-10 23:10               ` Juri Linkov
2020-06-10 23:24                 ` Dmitry Gutov
2020-06-13  9:51                 ` Simon Lang
2020-06-13 22:50                   ` Juri Linkov
2020-06-13  6:50           ` Eli Zaretskii
2020-06-13  9:48             ` Simon Lang
2020-09-27 12:56               ` Lars Ingebrigtsen
2020-06-09 12:15     ` Dmitry Gutov
2020-06-09 12:41       ` Simon Lang
2020-06-09 14:24 ` Eli Zaretskii
     [not found] <0e6ad4aefa2743f1b0d6ba4315a9e91b@VI1PR10MB2800.EURPRD10.PROD.OUTLOOK.COM>
2020-06-14  9:12 ` Simon Lang
2020-06-14 23:08   ` Juri Linkov
2020-06-22 19:09     ` Simon Lang
2020-06-22 23:50       ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2owgvj2.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=41766@debbugs.gnu.org \
    --cc=Simon.lang@outlook.com \
    --cc=dgutov@yandex.ru \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.