From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: highlight regular expression in grep window Date: Sat, 8 Feb 2014 14:50:18 -0800 (PST) Message-ID: References: <84ab5187-0def-45b6-bdb2-87693a1d77e5@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1391899845 4736 80.91.229.3 (8 Feb 2014 22:50:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 22:50:45 +0000 (UTC) To: Rami A , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 08 23:50:51 2014 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 1WCGjb-0001Hc-8e for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 23:50:51 +0100 Original-Received: from localhost ([::1]:48268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCGja-0003bm-Pi for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 17:50:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCGjH-0003aY-Jo for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 17:50:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCGj9-0000wV-0k for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 17:50:31 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:44684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCGj8-0000wQ-Qz for help-gnu-emacs@gnu.org; Sat, 08 Feb 2014 17:50:22 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s18MoK4T027177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 8 Feb 2014 22:50:21 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s18MoJZe015366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Feb 2014 22:50:20 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s18MoJ1d003197; Sat, 8 Feb 2014 22:50:19 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:95994 Archived-At: > I get this: > grep -nH -e WARN *.* /dev/null > grep: illegal option -- H > grep: illegal option -- e > Usage: grep -hblcnsviw pattern file . . . >=20 > 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' commands. 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).