From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9438: grep regressions Date: Tue, 06 Sep 2011 21:22:30 -0400 Message-ID: References: <87vct8gmjj.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315358601 8421 80.91.229.12 (7 Sep 2011 01:23:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2011 01:23:21 +0000 (UTC) Cc: 9438@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 07 03:23:16 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R16rE-0004Br-8E for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Sep 2011 03:23:16 +0200 Original-Received: from localhost ([::1]:47280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R16rD-0001Rd-OK for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2011 21:23:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R16rB-0001RY-GY for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2011 21:23:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R16rA-00051w-JR for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2011 21:23:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R16rA-00051l-Ge for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2011 21:23:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R16ur-0003II-Nt; Tue, 06 Sep 2011 21:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2011 01:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9438 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9438-submit@debbugs.gnu.org id=B9438.131535878412617 (code B ref 9438); Wed, 07 Sep 2011 01:27:01 +0000 Original-Received: (at 9438) by debbugs.gnu.org; 7 Sep 2011 01:26:24 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R16uF-0003HS-UU for submit@debbugs.gnu.org; Tue, 06 Sep 2011 21:26:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R16uD-0003HL-GR for 9438@debbugs.gnu.org; Tue, 06 Sep 2011 21:26:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGPGZk64rwMJ/2dsb2JhbABDqAl5gUYBAQQBViMFCws0EhQYDSSIBrhfhmoEoBeEQA X-IronPort-AV: E=Sophos;i="4.68,342,1312171200"; d="scan'208";a="134817630" Original-Received: from 184-175-3-9.dsl.teksavvy.com (HELO ceviche.home) ([184.175.3.9]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 06 Sep 2011 21:22:30 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 80D0E66246; Tue, 6 Sep 2011 21:22:30 -0400 (EDT) In-Reply-To: <87vct8gmjj.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 05 Sep 2011 11:34:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 06 Sep 2011 21:27:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50650 Archived-At: > Unfortunately, I can't find a simpler way to fix it than this patch: It doesn't look too terrible. > + ;; Calculate column positions (col . end-col) of first grep match on a line > + ((lambda () > + (when grep-highlight-matches > + (setq compilation-error-screen-columns nil) Why set it here? I know it used to be set similarly, but I think it should be set once and for all in grep-mode instead. > + (save-excursion > + (let* ((beg (progn (goto-char (match-end 0)) (point))) Why not (save-excursion (goto-char (match-end 0)) (let* ((beg (point)) Or better yet: (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) -- Stefan