From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: M-x grep: broken buffer with pipes Date: Wed, 30 Dec 2009 19:50:38 -0500 Message-ID: <4B3BF55E.7020407@gnu.org> References: <4B3BB2C6.9070700@gnu.org> <87tyv8yodv.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262220680 23393 80.91.229.12 (31 Dec 2009 00:51:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2009 00:51:20 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 31 01:51:13 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NQ9Fw-00007g-Fg for ged-emacs-devel@m.gmane.org; Thu, 31 Dec 2009 01:51:12 +0100 Original-Received: from localhost ([127.0.0.1]:57933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ9Fw-0002Iz-Uq for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 19:51:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQ9Fs-0002Is-9M for emacs-devel@gnu.org; Wed, 30 Dec 2009 19:51:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQ9Fn-0002HC-Nf for emacs-devel@gnu.org; Wed, 30 Dec 2009 19:51:07 -0500 Original-Received: from [199.232.76.173] (port=57782 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ9Fn-0002H4-A9 for emacs-devel@gnu.org; Wed, 30 Dec 2009 19:51:03 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:60643) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQ9Fm-0008QO-Al for emacs-devel@gnu.org; Wed, 30 Dec 2009 19:51:02 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NQ9Fj-0008Tn-SA for emacs-devel@gnu.org; Thu, 31 Dec 2009 01:50:59 +0100 Original-Received: from 38.105.200.250 ([38.105.200.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Dec 2009 01:50:59 +0100 Original-Received: from sds by 38.105.200.250 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Dec 2009 01:50:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.105.200.250 User-Agent: Thunderbird 2.0.0.22 (X11/20090625) In-Reply-To: <87tyv8yodv.fsf@mail.jurta.org> X-Enigmail-Version: 0.95.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119089 Archived-At: Juri Linkov wrote: >> M-x grep RET 'defvar.*buffer' *.el | grep -v '"' RET >> (the shell command is "grep -nH -e 'defvar.*buffer' *.el | grep -v '"'") >> The *grep* buffer now contains (correctly) about 10% fewer matches, and >> and are still good, but the part is no >> longer yellow. > > You can customize `grep-highlight-matches' to the value `always' > if you are content with the problems it might cause like > http://thread.gmane.org/gmane.emacs.devel/83316 this happens with "emacs -q". i.e., the default value of this variable is incorrect. indeed, when I customize this variable to nil, the problem goes away. >> That lack of match highlighting is not a big deal, however, there is >> a hugely more horrible problem: one cannot click on the file name to visit >> the file. >> When you click on the file name, the file selection menu appears, with the >> default being ^[[K where "^[" stands for the escape character (ESC >> (27, #o33, #x1b)) and is the file name you clicked on. >> So, where do these 3 spurious characters (ESC [ K) come from? > > I guess these escape sequences come from the grep switch --color that > outputs them around the matched strings. However, I can't reproduce your > problem. When I click on the file name that lacks of match highlighting, > it still visits the source file. What grep version do you have? grep (GNU grep) 2.5.1