Ever wanted to easily navigate between frames? Perhaps using arrow keys? Surprisingly, this didn't exist before (AFAIK).
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.
framemove on its own:
(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:
(setq framemove-hook-into-windmove t)
With the integration with
windmove, you just do
SHIFT-rightto 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.
Switching frames is a little more challenging than switching windows - mostly because windows are simply rectangular divisions of a window - it is easy to tell what window (if any) is to the right of the point. For frames, the answer is ambiguous because the placements of frames is free-form, and frames can overlap. I think this initial implementation does a reasonable job of choosing which frame to select. It first tries the frame directly in line with the point, and if one doesn't exist, it then uses the distance between the point (projected onto the edge of the current frame) and the frames in the given direction, and after that it just tries any frame that extends beyond the current frame in that direction.
Check it out.
Currently, when focus shifts to a new frame - the point does not change inside the frame.