abo-abo / ace-window

Quickly switch windows in Emacs
984 stars 87 forks source link

Add a option for show ace-window dispatch actions help immediately after invoke ace-window. #211

Closed zw963 closed 11 months ago

zw963 commented 3 years ago

Basically, after i invoke ace-window, i expect i can show following help immediately.(type ? automatially)

image

Sure, i think a better way is to use hydra, like this.

image

audiophfil commented 11 months ago

I was able to get this to work by queuing the "?" key command prior to calling ace-window:

(progn
       (setq unread-command-events (listify-key-sequence (kbd "?"))) ;; Queue "?" key command to be sent
       (ace-window nil))
zw963 commented 11 months ago

I was able to get this to work by queuing the "?" key command prior to calling ace-window:

(progn
     (setq unread-command-events (listify-key-sequence (kbd "?"))) ;; Queue "?" key command to be sent
     (ace-window nil))

It works, thank you! following is my config:

(global-set-key [remap other-window] (lambda ()
                                       (interactive)
                                       (progn
                                         (setq unread-command-events (listify-key-sequence (kbd "?"))) ;; Queue "?" key command to be sent
                                         (ace-window nil))
                                       ))