[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: next-error-find-buffer
From: |
Ted Zlatanov |
Subject: |
Re: next-error-find-buffer |
Date: |
Thu, 02 Aug 2007 16:45:44 -0400 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (darwin) |
On Thu, 02 Aug 2007 12:17:44 -0400 Stefan Monnier <address@hidden> wrote:
SM> To remind people of the context, C-x ` has two problems:
SM> 1 - if you have two projects, do C-x ` in the first, then do C-x ` in the
SM> second, and then come back to the first and do C-x ` again, you'd want
SM> this C-x ` to use the compilation buffer of the first project, not of
SM> the second one. So you'd want to sometimes ignore
SM> next-error-last-buffer. This is the reason why "next-error capable
SM> buffer in the current frame" currently takes precedence over
SM> next-error-last-buffer.
SM> 2 - if you do C-x ` on a compilation buffer and that jumps to a patch file,
SM> and then do C-x ` from that patch file's buffer, it should look for the
SM> next error in the compilation buffer rather than the next hunk in the
SM> patch file.
SM> Currently this is done by giving precedence to next-error-last-buffer
SM> over current-buffer (i.e. basically this always ignores
SM> current-buffer. In practice current-buffer is still often used because
SM> of the first rule "next-error capable buffer in current frame").
SM> The way I use Emacs, I have one frame per buffer. So the first rule
SM> basically means that current-buffer is always selected, so for me problem
SM> number 2 is not corrected.
SM> My original suggestion to fix number 2 was to introduce a new variable
SM> next-error-last-source-buffer which is set to the last source buffer visited
SM> by next-error. Then C-x ` would ignore current-buffer (and obey
SM> next-error-last-buffer instead) if the current buffer is equal to
SM> next-error-last-source-buffer: in the example problem, the C-x ` that puts
SM> me in the patch file would set next-error-last-source-buffer to that patch
SM> file buffer so hitting C-x ` in that patch file buffer would correctly
SM> ignore the patch file buffer and use the compilation buffer instead.
I think your fix makes sense. I've avoided work on next-error in the
past because of the recent release, but this was annoying behavior in
some cases.
I have some other proposals for the next/previous functionality, if
anyone is interested. Basically I think it should be expanded to other
parts of Emacs, because it's so handy.
Ted