Function: hkey-buffer-move
hkey-buffer-move is an interactive and byte-compiled function defined
in hmouse-drv.el.
Signature
(hkey-buffer-move DIRECTION &optional ARG)
Documentation
Move the current buffer to the next window in DIRECTION.
DIRECTION is a symbol, one of: up, down, left or right.
When the window-jump package is available and wj-jump-frames is
non-nil, the buffer may be moved across non-overlapping frames in
the given direction.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-drv.el
(defun hkey-buffer-move (direction &optional _arg)
"Move the current buffer to the next window in DIRECTION.
DIRECTION is a symbol, one of: up, down, left or right.
When the window-jump package is available and `wj-jump-frames' is
non-nil, the buffer may be moved across non-overlapping frames in
the given direction."
(interactive "SDirection to move buffer (up, down, left or right): \nP")
;; Prefer the window-jump package ...
(if (require 'window-jump nil t)
(let ((w1 (selected-window)))
(window-jump
(pcase direction
('left wj-vec-left)
('right wj-vec-right)
('down wj-vec-down)
('up wj-vec-up)
(_ (error "(hkey-buffer-move): Invalid movement direction, '%s'" direction))))
(hkey-swap-buffers w1 (selected-window)))
;; ... but if not available, use the Emacs builtin windmove package.
(eval-and-compile
(require 'windmove))
(condition-case ()
(windmove-swap-states-in-direction direction)
(error "(hkey-buffer-move): Invalid movement direction, '%s'" direction))))