0

I have a multi monitor setup and I typically have two Emacs frames, each filling a monitor.

I use display-buffer-reuse-window (reusable-frames . T) as my only customisation.

One thing bugs me in my workflow, I call next-error a lot and it will move the point to the next error in the compile buffer, and open the bad code in the window that I started in, but the focus remains in the compile buffer!

Is there a way to make the focus change frame when calling next-error? (when it needs to)

Right now I need to type C-x 5 o after every next-error when I'm using two monitors.

I've tried adding advice to go to the other frame after, but it doesn't seem to have any effect.

fommil
  • 1,750
  • 11
  • 24
  • To clarify terms, please have a look at [What's the difference between a buffer, a file, a window, and a frame?](http://emacs.stackexchange.com/questions/13583/whats-the-difference-between-a-buffer-a-file-a-window-and-a-frame) – Dan May 27 '16 at 10:45
  • The following link contains an example of how to target specific frames and windows to displaying a particular buffer **How to intercept a file before it opens and decide which frame**: http://stackoverflow.com/q/18346785/2112489 – lawlist May 27 '16 at 14:04
  • 2
    "*the focus remains in the compile buffer*". That sounds like a bug, to me. Consider reporting it: `M-x report-emacs-bug`. Preferably, provide a step-by-step recipe to reproduce it, starting with `emacs -Q` (no init file) - include any settings (e.g. customizations) needed to repro it. – Drew May 27 '16 at 16:11
  • @dan which term needs to be clarified? – fommil May 27 '16 at 16:25
  • @lawlist everything opens where it is supposed to, this is a matter of focus. – fommil May 27 '16 at 16:27
  • @drew OK I'll do that. Can you think of a minimal command that would create some errors in a compile buffer for a file? Maybe I could use Emacs source code as the example directory. – fommil May 27 '16 at 16:28
  • 2
    Maybe just `M-x grep` some files? Grep output (search hits) are considered "errors" in this regard. – Drew May 27 '16 at 18:44

0 Answers0