unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ari Roponen <ari.roponen@gmail.com>
To: 9679@debbugs.gnu.org
Subject: bug#9679: 24.0.90; After rgrep, next-error goes to the wrong line
Date: Thu, 06 Oct 2011 09:14:02 +0300	[thread overview]
Message-ID: <m3zkheabpx.fsf@gmail.com> (raw)


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





             reply	other threads:[~2011-10-06  6:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87r4uwybeh.fsf@gnu.org>
2011-10-06  6:14 ` Ari Roponen [this message]
2011-10-06 15:27   ` bug#9679: 24.0.90; After rgrep, next-error goes to the wrong line Juri Linkov
2011-10-07  5:15     ` Ari Roponen
2011-10-07  8:41       ` Ari Roponen
2011-10-07 15:20       ` Juri Linkov
2011-10-07 15:51         ` Ari Roponen
2011-10-07 16:36           ` Juri Linkov
2011-10-07 17:48             ` Ari Roponen
2011-10-08 16:30               ` Juri Linkov
2011-10-09  5:38                 ` Ari Roponen
2012-05-06  6:23                   ` Ari Roponen
     [not found]   ` <handler.9679.C.13363577086087.notifdonectrl.0@debbugs.gnu.org>
2012-05-13  6:39     ` bug#9679: acknowledged by developer (close 9679) Ari Roponen
2012-05-13  9:18       ` Chong Yidong

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=m3zkheabpx.fsf@gmail.com \
    --to=ari.roponen@gmail.com \
    --cc=9679@debbugs.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).