From: Juri Linkov <juri@jurta.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Highlighting in grep buffer
Date: Thu, 08 Apr 2004 07:21:18 +0300 [thread overview]
Message-ID: <87hdvvhzgh.fsf@mail.jurta.org> (raw)
In-Reply-To: DNEMKBNJBGPAOPIJOOICAEGBCAAA.drew.adams@oracle.com
Isn't something like this a simpler and more reliable solution?
*** emacs/lisp/progmodes/grep.el 11 Mar 2004 22:56:19 -0000 1.10
--- emacs/lisp/progmodes/grep.el 8 Apr 2004 00:37:46 -0000
***************
*** 281,288 ****
--- 281,291 ----
(defun grep-process-setup ()
"Setup compilation variables and buffer for `grep'.
Set up `compilation-exit-message-function' and run `grep-setup-hook'."
+ (setenv "GREP_OPTIONS" "--color=always")
+ (setenv "GREP_COLOR" "01;31")
(set (make-local-variable 'compilation-exit-message-function)
(lambda (status code msg)
+ (ansi-color-apply-on-region (point-min) (point-max))
(if (eq status 'exit)
(cond ((zerop code)
'("finished (matches found)\n" . "matched"))
The matching positions returned by grep could be also used instead of
`highlight-regexp' to highlight substrings in visited source lines.
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2004-04-08 4:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-05 22:03 Highlighting in grep buffer Richard Stallman
2004-04-05 23:05 ` Drew Adams
2004-04-07 17:45 ` Richard Stallman
2004-04-07 18:16 ` Drew Adams
2004-04-08 4:21 ` Juri Linkov [this message]
2004-04-08 16:38 ` Stefan Monnier
2004-04-10 22:29 ` Juri Linkov
2004-04-11 23:20 ` Stefan Monnier
2004-05-06 8:55 ` Juri Linkov
2004-05-06 14:39 ` Stefan Monnier
2004-05-06 21:03 ` Miles Bader
2004-05-08 21:46 ` Juri Linkov
2004-04-09 22:46 ` Richard Stallman
2004-04-10 22:28 ` Juri Linkov
2004-04-12 3:52 ` Richard Stallman
2004-04-12 4:32 ` Miles Bader
[not found] <DNEMKBNJBGPAOPIJOOICMEGCCAAA.drew.adams@oracle.com>
2004-04-13 11:45 ` 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=87hdvvhzgh.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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.