Function: hkey-ace-window-setup

hkey-ace-window-setup is an autoloaded and byte-compiled function defined in hmouse-drv.el.

Signature

(hkey-ace-window-setup &optional KEY)

Documentation

Bind optional keyboard KEY and setup display of items specified by short ids.

The ace-window package, (see "https://elpa.gnu.org/packages/ace-window.html"), assigns short ids to each Emacs window and lets you jump to or operate upon a specific window by giving its letter. Hyperbole can insert an operation into ace-window that allows you to display items such as Dired or buffer menu items in a specific window.

To enable this feature, in your Emacs initialization file after Hyperbole is initialized, if you already have a key bound for ace-window, then call:

 (hkey-ace-window-setup)

otherwise, choose a binding like {\M-o} and send it to the same function to bind it:

 (hkey-ace-window-setup "\\357")

Then whenever point is on an item you want displayed in another window, use {\M-o i <id-of-window-to-display-item-in>} and watch the magic happen.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-drv.el
;;; ************************************************************************
;;; Hyperbole ace-window selection functions
;;; https://github.com/abo-abo/ace-window
;;; ************************************************************************

;; A call to (hkey-ace-window-setup) or (require 'ace-window) must be
;; made prior to calling any other function in this section since
;; Hyperbole does not require ace-window itself.

;;;###autoload
(defun hkey-ace-window-setup (&optional key)
  "Bind optional keyboard KEY and setup display of items specified by short ids.

The ace-window package, (see \"https://elpa.gnu.org/packages/ace-window.html\"),
assigns short ids to each Emacs window and lets you jump to or
operate upon a specific window by giving its letter.  Hyperbole
can insert an operation into ace-window that allows you to
display items such as Dired or buffer menu items in a specific
window.

To enable this feature, in your Emacs initialization file after
Hyperbole is initialized, if you already have a key bound for
ace-window, then call:

 (hkey-ace-window-setup)

otherwise, choose a binding like {\\`M-o'} and send it to the same
function to bind it:

 (hkey-ace-window-setup \"\M-o\")

Then whenever point is on an item you want displayed in another
window, use {\\`M-o' i <id-of-window-to-display-item-in>} and watch the
magic happen."
  (require 'ace-window)
  (when key (hkey-set-key key 'ace-window))
  (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
	;; allows {i} operation to work when only 2 windows exist
	aw-dispatch-always t)
  ;; New ace-window frames (window id = z) inherit the size of the
  ;; prior selected frame; same as HyWindow.
  (setq aw-frame-size '(0 . 0)
	aw-dispatch-alist (delq (assq ?i aw-dispatch-alist)
				(delq (assq ?r aw-dispatch-alist)
				      (delq (assq ?t aw-dispatch-alist)
					    (delq (assq ?w aw-dispatch-alist) aw-dispatch-alist)))))
  (push '(?w hkey-window-link "Hyperbole: Window Link") aw-dispatch-alist)
  (push '(?t hkey-throw   "Hyperbole: Throw") aw-dispatch-alist)
  (push '(?r hkey-replace "Hyperbole: Replace Here") aw-dispatch-alist)
  ;; Ace-window includes ?m as the swap windows key, so it is not added here.
  (push '(?i hkey-drag-item "Hyperbole: Drag Item") aw-dispatch-alist)
  (ace-window-display-mode 1))