From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: M-x grep: broken buffer with pipes Date: Thu, 31 Dec 2009 03:08:42 +0200 Organization: JURTA Message-ID: <87r5qcvtk5.fsf@mail.jurta.org> References: <4B3BB2C6.9070700@gnu.org> <87tyv8yodv.fsf@mail.jurta.org> <4B3BF55E.7020407@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262221917 26012 80.91.229.12 (31 Dec 2009 01:11:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2009 01:11:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sam Steingold Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 31 02:11:50 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 1NQ9Zn-0007lt-HJ for ged-emacs-devel@m.gmane.org; Thu, 31 Dec 2009 02:11:43 +0100 Original-Received: from localhost ([127.0.0.1]:41216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ9Zn-0008RN-Kt for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 20:11:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQ9Zj-0008RI-CK for emacs-devel@gnu.org; Wed, 30 Dec 2009 20:11:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQ9Ze-0008Qc-Ci for emacs-devel@gnu.org; Wed, 30 Dec 2009 20:11:38 -0500 Original-Received: from [199.232.76.173] (port=60296 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ9Ze-0008QZ-9E for emacs-devel@gnu.org; Wed, 30 Dec 2009 20:11:34 -0500 Original-Received: from smtp-out4.starman.ee ([85.253.0.6]:47345 helo=mx2.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQ9Zb-0001Lo-QC; Wed, 30 Dec 2009 20:11:32 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.30.172.cable.starman.ee [82.131.30.172]) by mx2.starman.ee (Postfix) with ESMTP id C5CA53F40C4; Thu, 31 Dec 2009 03:11:26 +0200 (EET) In-Reply-To: <4B3BF55E.7020407@gnu.org> (Sam Steingold's message of "Wed, 30 Dec 2009 19:50:38 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:119092 Archived-At: >> 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. The current default `auto' is chosen to cause less problems than with the value `always'. >> 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 GNU grep 2.5.1 uses a different method of match highlighting. grep 2.5.1 relies on the environment variable `GREP_COLOR' whereas grep 2.5.2 and later use the variable `GREP_COLORS'. However, when I tried to reproduce this with GNU grep 2.5.1, it still correctly visits the source file. So I don't understand what it going on. Anyone else can reproduce this problem? -- Juri Linkov http://www.jurta.org/emacs/