|
From: | Sam Steingold |
Subject: | Re: M-x grep: broken buffer with pipes |
Date: | Wed, 30 Dec 2009 19:50:38 -0500 |
User-agent: | Thunderbird 2.0.0.22 (X11/20090625) |
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 <file> and <line> are still good, but the <defvar foo-buffer> 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<file> where "^[" stands for the escape character (ESC (27, #o33, #x1b)) and <file> 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
[Prev in Thread] | Current Thread | [Next in Thread] |