I'm using Doom in Emacs 27.2. I can call imenu-list-smart-toggle and I get the imenu window. If I switch to that window using the keyboard, it functions normally.

But, when the cursor is in my text editing window and I use the mouse to click on an imenu window entry, cursor focus jumps back to my editing window without any navigation occuring. I have to click on a blank area in the imenu window to switch focus to that window, and then click on the menu entry.

imenu works fine in my old (Spacemacs) setup so I'm not sure what is going on.

  • 1
    It may be helpful to see what your mouse click is bound to when you expect imenu to react in a certain way. Perhaps you could try C-h k and then your mouse click in the desired location ... aka M-x describe-key
    – lawlist
    Sep 1, 2021 at 3:23
  • evil-mouse-drag-region is an interactive and compiled function defined in evil-commands.el. Signature (evil-mouse-drag-region START-EVENT) Documentation Set the region to the text that the mouse is dragged over. Highlight the drag area as you move the mouse. This must be bound to a button-down mouse event. If the click is in the echo area, display the *Messages* buffer. START-EVENT should be the event that started the drag. Key Bindings evil-motion-state-map <down-mouse-1> References evil-mouse-drag-region is unused in evil-commands.el. Sep 1, 2021 at 5:40
  • I don't use evil, but my first inclination would be to remove that keyboard/mouse assignment to evil-mouse-drag-region and see if that fixes your issue.
    – lawlist
    Sep 1, 2021 at 13:40
  • In normal emacs (or at least my emacs :-) ), <mouse-1> is bound to mouse-drag-region but if there is no region, it gets translated to <mouse-2> which is bound to push-button: it seems that Doom is missing that translation. See if <mouse-2> is bound to push-button and if it is, try that button.
    – NickD
    Sep 1, 2021 at 15:30
  • OK, I'll ask on the Doom channel to see how I could achieve that Sep 1, 2021 at 19:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.