unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
To: 7351@debbugs.gnu.org
Subject: bug#7351: 24.0.50; next-error no longer takes into account buffer modifications
Date: Sun, 7 Nov 2010 01:26:27 +0200	[thread overview]
Message-ID: <201011070126.28016.pogonyshev@gmx.net> (raw)

When hitting C-x ` (next-error) the point is positioned correctly only
if the buffer is not modified.  If number of lines before the target
position is changed, point is positioned wrongly.

For instance, say 'test.txt' contains these lines:

    foo
    bar
    baz

I then run 'grep' from Emacs like this:

    grep -nH -e ba test.txt

Results:

    -*- mode: grep; default-directory: "/home/paul/test/" -*-
    Grep started at Sun Nov  7 01:25:17

    grep -nH -e ba test.txt
    test.txt:2:bar
    test.txt:3:baz

    Grep finished (matches found) at Sun Nov  7 01:25:17

Then I insert a few more lines in 'test.txt' buffer:

    foo
    bar
    spam
    ham
    baz

Now if I hit C-x ` the first time point is moved to line 2 --
correctly.  The second time, however, the point is moved to line 3,
i.e. the original location of 'baz'.  However, 'baz' is now at line 5
and that's where I expect C-x ` to move point to.  Note that at no
point I closed the buffer, so Emacs should be able to track changes
between 'grep' run and current buffer/file contents.

This is especially unhelpful with compilation errors.  Often, you'd go
through errors fixing them in process, sometimes adding or removing
lines.  However, any such change makes finding subsequent errors
difficult as C-x ` will no longer locate errors correctly.

I believe this used to work fine in past.

Paul





             reply	other threads:[~2010-11-06 23:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 23:26 Paul Pogonyshev [this message]
2010-11-11  0:49 ` bug#7351: 24.0.50; next-error no longer takes into account buffer modifications Glenn Morris
2010-11-11 19:31   ` Paul Pogonyshev
2010-11-11 22:12     ` Jan Djärv
     [not found]   ` <mailman.0.1289504684.29678.bug-gnu-emacs@gnu.org>
2010-12-06 16:06     ` Ted Zlatanov

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=201011070126.28016.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=7351@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).