Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have an Emacs frame on each of my displays, how can I easily navigate buffers between the two displays? I typically use shift + arrows to jump to the direction of the buffer I'm looking for, but with two frames, it won't jump.

Is there a trick to this? Or do I need to give the other Emacs frame focus first (which is a step I would like to avoid).

share|improve this question
+1 Hopefully you get an answer that tells us how. But I doubt one exists... – Nifle Feb 4 '10 at 0:04

You can use the newly created package I uploaded to the wiki: framemove.el. To cut/paste my notes from my blog entry about it:

I wrote the package framemove to have the same usage as Emacs' built in windmove package. And, even better, it can integrate with windmove so that when you run out of windows to move between, you'll jump to the next frame in that direction.

To install framemove on its own:

(require 'framemove)
(framemove-default-keybindings) ;; default prefix is Meta

But you might want to use this in conjunction with windmove, in which case this is the integration code to add to your .emacs:

(require 'framemove)
(setq framemove-hook-into-windmove t)

With the integration with windmove, you just do SHIFT-right to move focus to the window to the right of the current, and when there are no more, focus will shift to the frame to the right.

share|improve this answer
Come on mwilliams, accept this as the answer. I use framemove myself, and it is an excellent package that does exactly what you asked for, and even works with the same keybindings you're already using. – phils Jul 1 '10 at 22:01

Unless I misinterpreted your question -- especially the part where you say "navigate buffers between the two displays". I'm assuming you mean that you want to move the cursor between buffers on different displays.

I think the emacs function you're looking for is other-frame. It's typically bound to C-x 5 o. You can, of course, bind this to what ever other key combination you'd like (this is emacs after all).

To find out what it's currently bound to, type C-h w (whereis help) and then type other-frame.

share|improve this answer
Actually, at least in my windowing system (OSX) other-frame doesn't change screens. So, if I have two frames in different virtual desktops, I can't other-frame between them... – Brian Postow Apr 27 '10 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .