0

I have configured the M-p key to trigger ace-window, but when I navigate to the sr-speedbar window it stops working and I have to use C-x o to move out. Is there some mode hook I have to use to ensure that M-p works in sr-speedbar or does sr-speedbar use that key for something else?

(use-package ace-window
  :ensure t
  :defer t
  :init
  (progn
    (global-set-key (kbd "M-p") 'ace-window)
    (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
     ;;more info at https://github.com/abo-abo/ace-window
    )
  )
lawlist
  • 18,826
  • 5
  • 37
  • 118
vfclists
  • 1,347
  • 1
  • 11
  • 28
  • To answer just a part of your own question "*... or does `sr-speedbar` use that key for something else?*", the general approach is to type `C-h k` or `M-x describe-key` and then the keyboard shortcut from a particular buffer to see what function is linked to it. [FYI: `sr-speedbar` is a modification/tweak/add-on to the built-in `speedbar` library, rather than a completely separate animal.] – lawlist Aug 03 '17 at 23:50
  • Forum participants should be aware that there is a duplicate thread on reddit: https://www.reddit.com/r/emacs/comments/6rfbx2/how_can_the_acewindow_hotkey_be_set_to_work_in/?st=j5x3mu93&sh=a07e1a21 – lawlist Aug 03 '17 at 23:56
  • I prefer SE to reddit as SE is dedicated resource that can be archived, but questions can be closed or put on hold simply because the person asking the question doesn't know how to frame the question properly, and responses on reddit seem to be faster. – vfclists Aug 04 '17 at 15:23
  • I have asked a [related question](https://emacs.stackexchange.com/questions/34672/what-is-considered-good-practice-for-changing-an-existing-but-unneeded-binding-t) which is a generalized version of this one. – vfclists Aug 04 '17 at 15:26

0 Answers0