help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: highlight regular expression in grep window


From: Rami A
Subject: Re: highlight regular expression in grep window
Date: Wed, 4 Sep 2013 12:32:35 -0700 (PDT)
User-agent: G2/1.0

Thanks Drew.
You are right, I am not looking to highlight the regexp in the results but only 
to highlight it at the top of results.
I checked your grep+.el but the problem is that I already customized grep.el 
functions for my needs and don't want to do the same again.
I am not even worried about "highlighting" the regexp, I just want a way to 
find out what the expression that I grepped for once I switch to that window.

My customized grep function is something like:

find . -type d \( -name unix -o -name "*_sim" -o -name RCS -o -name CVS -o 
-name SCCS \) -prune -o -type f \! -name \*\~ \! -name \*\,v \! -name s.\* \! 
-name .\#\* -name \*.\[sch\] -print | xargs -e grep -n -i  mem_test  /dev/null

So the token "mem_test" which I am looking for would be invisible because it is 
at the end of that string.

I just want something like:

The token I am grepping on is: mem_test
find . -type d \( -name unix -o -name "*_sim" -o -name RCS -o -name CVS -o 
-name SCCS \) -prune -o -type f \! -name \*\~ \! -name \*\,v \! -name s.\* \! 
-name .\#\* -name \*.\[sch\] -print | xargs -e grep -n -i  mem_test  /dev/null

or, as I mentioned earlier to include that token at the bottom along with the 
title of the buffer "*grep* mem_test

I am sure there should be a way to modify the grep.el functions to achieve that 
somehow.


reply via email to

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