From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rami A Newsgroups: gmane.emacs.help Subject: Re: highlight regular expression in grep window Date: Wed, 4 Sep 2013 12:32:35 -0700 (PDT) Message-ID: <2d2fe767-9f72-422c-beb9-5dbed1ec89f8@googlegroups.com> References: <84ab5187-0def-45b6-bdb2-87693a1d77e5@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1378323318 24366 80.91.229.3 (4 Sep 2013 19:35:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Sep 2013 19:35:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 04 21:35:21 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VHIrG-0007nF-NS for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Sep 2013 21:35:18 +0200 Original-Received: from localhost ([::1]:54916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHIrG-0006jH-BU for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Sep 2013 15:35:18 -0400 X-Received: by 10.66.229.6 with SMTP id sm6mr1473527pac.30.1378323156134; Wed, 04 Sep 2013 12:32:36 -0700 (PDT) X-Received: by 10.50.9.33 with SMTP id w1mr281511iga.12.1378323155881; Wed, 04 Sep 2013 12:32:35 -0700 (PDT) Original-Path: usenet.stanford.edu!y3no1541119pbx.0!news-out.google.com!z6ni33820pbu.0!nntp.google.com!j7no274851qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=148.87.19.198; posting-account=HZ4YzgoAAABkTSCruZ7Bs4hufjlOUmBF Original-NNTP-Posting-Host: 148.87.19.198 User-Agent: G2/1.0 Injection-Date: Wed, 04 Sep 2013 19:32:35 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:200976 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93245 Archived-At: 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.