[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: highlight regular expression in grep window

From: Drew Adams
Subject: RE: highlight regular expression in grep window
Date: Sat, 8 Feb 2014 14:50:18 -0800 (PST)

> I get this:
> grep -nH -e WARN *.* /dev/null
> grep: illegal option -- H
> grep: illegal option -- e
> Usage: grep -hblcnsviw pattern file . . .
> Is that because I am running under Solaris? Which doesn't recognize
> the --color option for grep command.

Dunno; you tell me.  See the doc string for option
`grep-highlight-matches'.  I'm no expert on different OS `grep'

You don't mention your Emacs version.  If your version of `grep'
won't do the highlighting, you can try this (untested - this is
really for older Emacs versions, but I think it should work OK):

Do not load library grep.el or grep+.el.  Instead, load these
libraries in this order: compile-20.el, compile.el, compile+20.el.

The first and third are from Emacs Wiki.  They provide an
older version of what grep+.el provides.  They do the regexp
highlighting without depending on the `grep' OS command for it.

No, they won't give you everything that the latest and greatest
Emacs code will give you - they are what I use for Emacs 20 and
21.  But they should at least let you use `M-x grep' with
highlighting of the regexp matches in buffer *grep* (and more).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]