From: Sam Steingold <sds@gnu.org>
To: emacs-devel@gnu.org
Subject: M-x grep: broken buffer with pipes
Date: Wed, 30 Dec 2009 15:06:30 -0500 [thread overview]
Message-ID: <4B3BB2C6.9070700@gnu.org> (raw)
For specificity, visit the emacs/lisp/grep.el file and do
M-x grep RET 'defvar.*buffer' *.el RET
(I.e., the shell command is "grep -nH -e 'defvar.*buffer' *.el").
the *grep* buffer contains about 50 matches, each clickable,
and a line typically looks like
<file>:<line>:(<defvar foo-buffer>-zot nil
where <file> is green, <line> is reddish, <defvar foo-buffer> is yellow.
Everything is great, clicking on the file name visits the file.
Now, in the same grep.el buffer, do this:
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.
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?
next reply other threads:[~2009-12-30 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-30 20:06 Sam Steingold [this message]
2009-12-31 0:32 ` M-x grep: broken buffer with pipes Juri Linkov
2009-12-31 0:50 ` Sam Steingold
2009-12-31 1:08 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B3BB2C6.9070700@gnu.org \
--to=sds@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).