From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ari Roponen Newsgroups: gmane.emacs.bugs Subject: bug#9679: 24.0.90; After rgrep, next-error goes to the wrong line Date: Thu, 06 Oct 2011 09:14:02 +0300 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317881704 3389 80.91.229.12 (6 Oct 2011 06:15:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 Oct 2011 06:15:04 +0000 (UTC) To: 9679@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 06 08:15:00 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 1RBhER-0006Vf-Vb for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Oct 2011 08:15:00 +0200 Original-Received: from localhost ([::1]:33248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBhER-00043H-HR for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Oct 2011 02:14:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBhEP-000430-0u for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:14:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBhEO-0007f9-2H for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:14:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBhEN-0007f4-Sm for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:14:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RBhEU-00008w-JK for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ari Roponen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Oct 2011 06:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9679 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1317881670496 (code B ref -1); Thu, 06 Oct 2011 06:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Oct 2011 06:14:30 +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 1RBhDx-00007w-NT for submit@debbugs.gnu.org; Thu, 06 Oct 2011 02:14:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBhDv-00007k-NM for submit@debbugs.gnu.org; Thu, 06 Oct 2011 02:14:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBhDi-0007bP-6e for submit@debbugs.gnu.org; Thu, 06 Oct 2011 02:14:15 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:58797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBhDi-0007bJ-5C for submit@debbugs.gnu.org; Thu, 06 Oct 2011 02:14:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBhDh-00042c-3z for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:14:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBhDg-0007az-4T for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:14:13 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:49031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBhDf-0007at-SE for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 02:14:12 -0400 Original-Received: by bkbzs2 with SMTP id zs2so3415107bkb.0 for ; Wed, 05 Oct 2011 23:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; bh=WOuXcm7KF2M2RLjVXm5fZ5XYQGQJwFF0dhsH2Gq+45M=; b=oQtdK/4dsIbM4fAiXKY1ieCKMOl10lC4Dm1iP6lopKSQn0ntG/LXiJ5HnMwjXZgE4P +LZ07qk3n+SdCyAo2Dmyq8bR0A1zVon2wa5t/z2SdAykcV1VcYEVIdnnufIb4Yb0ZfHH gCUrWtKqOWLHbv+CLmX8G31sJUU1fq+lEWrnA= Original-Received: by 10.223.17.84 with SMTP id r20mr1464354faa.33.1317881650376; Wed, 05 Oct 2011 23:14:10 -0700 (PDT) Original-Received: from arirop (dsl-jklbrasgw1-fe17fb00-113.dhcp.inet.fi. [84.251.23.113]) by mx.google.com with ESMTPS id k26sm5647099fab.12.2011.10.05.23.14.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Oct 2011 23:14:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 06 Oct 2011 02:15:02 -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:52257 Archived-At: Sometimes next-error goes to the wrong line when stepping through rgrep matches. Using git bisect and the code below, I found the commit that causes the problem (rev 105677). Reverting that (and before that a commit that depended on it) makes the problem disappear. rev 105685: (grep-regexp-alist): Move dangling comment to the previous rule. rev 105677: progmodes/grep.el (grep-regexp-alist): Calculate column positions I used the following test case to find the problematic commit. It creates a file with two lines matching "mapcar" and then rgreps for it. After that it calls next-error two times. The second call goes into the line starting with " (list 'face ...". ^- here --- code begins ---- (let ((dir (expand-file-name (format "tmp%d" (emacs-pid)) temporary-file-directory))) (ignore-errors (make-directory dir)) (with-temp-file (expand-file-name "test.el" dir) (insert "(defun my-diary-lib--date-to-string (date) (destructuring-bind (month day year) (mapcar 'number-to-string date) (concat day \".\" month \".\" year))) \(defun my-diary-lib--string-to-date (datestr) (destructuring-bind (day month year) (mapcar #'string-to-number (split-string datestr \"\\\\.\")) (list month day year))) \(defun my-diary-lib-add-dayname (datestr) (list 'face 'font-lock-comment-face 'display (concat datestr \" \" (calendar-day-name (my-diary-lib--string-to-date datestr))))) ")) (grep-compute-defaults) (rgrep "mapcar" "test.el" dir) (run-with-idle-timer 0.5 nil #'next-error 1) (run-with-idle-timer 1.0 nil #'next-error 1)) --- code ends --- In GNU Emacs 24.0.90.7 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.0) of 2011-10-06 on arirop Windowing system distributor `Fedora Project', version 11.0.11000000 configured using `configure '--with-x-toolkit=gtk3'' -- Ari Roponen