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: M-x grep: broken buffer with pipes Date: Wed, 30 Dec 2009 15:06:30 -0500 Message-ID: <4B3BB2C6.9070700@gnu.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 1262203634 11713 80.91.229.12 (30 Dec 2009 20:07:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2009 20:07:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 30 21:07:07 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 1NQ4oz-0008Qh-L5 for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 21:07:05 +0100 Original-Received: from localhost ([127.0.0.1]:44184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ4p0-0006uF-59 for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 15:07:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQ4ou-0006tN-U6 for emacs-devel@gnu.org; Wed, 30 Dec 2009 15:07:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQ4op-0006pd-PG for emacs-devel@gnu.org; Wed, 30 Dec 2009 15:07:00 -0500 Original-Received: from [199.232.76.173] (port=44907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ4op-0006pa-K2 for emacs-devel@gnu.org; Wed, 30 Dec 2009 15:06:55 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:34902) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQ4op-0000qZ-2B for emacs-devel@gnu.org; Wed, 30 Dec 2009 15:06:55 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NQ4om-0008LS-1o for emacs-devel@gnu.org; Wed, 30 Dec 2009 21:06:52 +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 ; Wed, 30 Dec 2009 21:06:52 +0100 Original-Received: from sds by 38.105.200.250 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Dec 2009 21:06:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 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) 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:119071 Archived-At: 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 ::(-zot nil where is green, is reddish, 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 and are still good, but the 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 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?