Letting the space key be the leader key in mu4e

What happened?

I tried to use the SPC key in mu4e and it is bound to scroll-up-command, so instead of getting the Doom menu, the contents on the screen just scrolled up.

I’ve tried a few things to unmap SPC but I’m not getting it right. I understand it has some utility acting as a pager when reading messages, but on the main screen for mu4e it doesn’t do much, but does mess up my muscle memory.

Current workaround is to use OPT SPC to get the menu from inside mu4e. I’d rather not have to do that, at least in *mu4e-main*.

I don’t know if this is an “issue” so much as me not understanding the interplay between how keys are bound in mu4e and how they’re bound more widely.

What did you expect to happen?

I expected the menu to open, as it does elsewhere in other modules.

Steps to reproduce

  1. Make sure you’ve mapped the leader key to SPC
  2. open mu4e
  3. tap SPC

System information

Loading data dump...

I take it you’re using Mu 1.10? This is an upstream problem: Adapt evil-collection-mu4e for latest mu4e development version by meliache · Pull Request #720 · emacs-evil/evil-collection · GitHub

Courtesy of the Doom subreddit, and for anyone else who comes across this here while a fix is pending:

(after! mu4e
  (evil-define-key* '(emacs) mu4e-main-mode-map (kbd "SPC") 'doom/leader)
  (evil-define-key* '(emacs) mu4e-headers-mode-map (kbd "SPC") 'doom/leader)

(Alternately: “upgrade evil-collection to the latest from master to fix it,” but I haven’t tested this.)