* bug#7351: 24.0.50; next-error no longer takes into account buffer modifications
@ 2010-11-06 23:26 Paul Pogonyshev
2010-11-11 0:49 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Paul Pogonyshev @ 2010-11-06 23:26 UTC (permalink / raw
To: 7351
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7351: 24.0.50; next-error no longer takes into account buffer modifications
2010-11-06 23:26 bug#7351: 24.0.50; next-error no longer takes into account buffer modifications Paul Pogonyshev
@ 2010-11-11 0:49 ` Glenn Morris
2010-11-11 19:31 ` Paul Pogonyshev
[not found] ` <mailman.0.1289504684.29678.bug-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Glenn Morris @ 2010-11-11 0:49 UTC (permalink / raw
To: Paul Pogonyshev; +Cc: 7351
Paul Pogonyshev wrote:
> I believe this used to work fine in past.
Could you give a release of Emacs in which this works?
I tried 21.4, 22.1, 22.2, 22.3, 23.1, and 23.2; and it didn't seem to
work in any of them.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7351: 24.0.50; next-error no longer takes into account buffer modifications
2010-11-11 0:49 ` 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>
1 sibling, 1 reply; 5+ messages in thread
From: Paul Pogonyshev @ 2010-11-11 19:31 UTC (permalink / raw
To: Glenn Morris; +Cc: 7351
Glenn Morris wrote:
> Paul Pogonyshev wrote:
>
> > I believe this used to work fine in past.
>
> Could you give a release of Emacs in which this works?
>
> I tried 21.4, 22.1, 22.2, 22.3, 23.1, and 23.2; and it didn't seem to
> work in any of them.
No. I seem to recollect that at some point (certainly before 24.x
development, maybe even before 23) I could fix a compilation error in
a C file by adding/removing lines, and subsequent errors would still
be found correctly, without any line offset. Maybe it depends on
actual error source, i.e. gcc vs. grep? Then again, maybe I invented
this whole story and my memory is failing...
In the latter case, can this be requalified as a feature request?
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7351: 24.0.50; next-error no longer takes into account buffer modifications
2010-11-11 19:31 ` Paul Pogonyshev
@ 2010-11-11 22:12 ` Jan Djärv
0 siblings, 0 replies; 5+ messages in thread
From: Jan Djärv @ 2010-11-11 22:12 UTC (permalink / raw
To: Paul Pogonyshev; +Cc: 7351
FWIW, I remember this feature also from 5-10 years ago. But I hadn't noticed
that it was gone now.
Jan D.
Paul Pogonyshev skrev 2010-11-11 20.31:
> Glenn Morris wrote:
>> Paul Pogonyshev wrote:
>>
>>> I believe this used to work fine in past.
>>
>> Could you give a release of Emacs in which this works?
>>
>> I tried 21.4, 22.1, 22.2, 22.3, 23.1, and 23.2; and it didn't seem to
>> work in any of them.
>
> No. I seem to recollect that at some point (certainly before 24.x
> development, maybe even before 23) I could fix a compilation error in
> a C file by adding/removing lines, and subsequent errors would still
> be found correctly, without any line offset. Maybe it depends on
> actual error source, i.e. gcc vs. grep? Then again, maybe I invented
> this whole story and my memory is failing...
>
> In the latter case, can this be requalified as a feature request?
>
> Paul
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug#7351: 24.0.50; next-error no longer takes into account buffer modifications
[not found] ` <mailman.0.1289504684.29678.bug-gnu-emacs@gnu.org>
@ 2010-12-06 16:06 ` Ted Zlatanov
0 siblings, 0 replies; 5+ messages in thread
From: Ted Zlatanov @ 2010-12-06 16:06 UTC (permalink / raw
To: bug-gnu-emacs
On Thu, 11 Nov 2010 21:31:56 +0200 Paul Pogonyshev <pogonyshev@gmx.net> wrote:
PP> Glenn Morris wrote:
>> Paul Pogonyshev wrote:
>>
>> > I believe this used to work fine in past.
>>
>> Could you give a release of Emacs in which this works?
>>
>> I tried 21.4, 22.1, 22.2, 22.3, 23.1, and 23.2; and it didn't seem to
>> work in any of them.
PP> No. I seem to recollect that at some point (certainly before 24.x
PP> development, maybe even before 23) I could fix a compilation error in
PP> a C file by adding/removing lines, and subsequent errors would still
PP> be found correctly, without any line offset. Maybe it depends on
PP> actual error source, i.e. gcc vs. grep? Then again, maybe I invented
PP> this whole story and my memory is failing...
PP> In the latter case, can this be requalified as a feature request?
compilation-mode and the other providers of `next-error' set it up
differently (see `compilation-next-error-function'). I know that `M-x
occur' will track occurrences through add/delete changes, for instance,
but it has access to the original buffer. compilation-mode only has
access to line numbers at the time of the compilation.
Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-06 16:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-06 23:26 bug#7351: 24.0.50; next-error no longer takes into account buffer modifications Paul Pogonyshev
2010-11-11 0:49 ` 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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.