emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: next-error-last-buffer


From: Stefan Monnier
Subject: Re: next-error-last-buffer
Date: 28 May 2004 11:29:00 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>     Maybe if there's more than one next-error capable buffers that are
>     linked together (e.g. occur on a diff) then C-u next-error should
>     advance through the "underlying" next-error buffer (the diff) while
>     next-error should advance through the "overlay" next-error buffer
>     (the occur).

> That is a bad solution because it requires people to remember
> yet another feature.  The other solution is better, because
> it is more likely that the intended thing will happen
> as a result of use of the other existing features.

A less intrusive (and hence less complete) solution:

- Create a new compilation-last-source-buffer variable.
- At the end of next-error, set this new variable to the buffer just being
  displayed.
- at the beginning of next-error check compilation-last-source-buffer:
  if it is equal to current-buffer, then don't consider this buffer as
  a "compilation" buffer (i.e. ignore its next-error-function).

This way if a C-x ` lands us in a diff-mode buffer (because of a *grep* that
points to a patch file), a subsequent C-x ` in the same buffer will not
mistakenly step through the diffs of this buffer but will go to the next
grep match.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]