I wrote recently about setting up a custom key map, and there are a couple of shortcuts for mu4e functions that I use very often with that key map.
With the following code I define c
in my key map to compose a new email. Since I previously set C-1
to be the prefix for my map, then C-1 c
is the full keybinding. This works globally so I can start a new email from anywhere in Emacs with C-1 c
.
I then supercharge the keybinding by using it to add a CC to an email if I am already composing one. This is done by binding C-1 c
in the mu4e-compose-mode-map
to message-goto-cc
. So now C-1 c
starts a new email unless I am already writing an email in which case it adds a CC instead.
While I am at it, I also add s
to my keymap for mu4e-headers-search
so I can use C-1 s
to launch a search of my emails from anywhere in Emacs.
;; bjm-map is already bound to the prefix C-1 ;; use C-1 c to compose a new email (define-key bjm-map (kbd "c") 'mu4e-compose-new) ;; use C-1 c for add cc if already in composition mode (define-key mu4e-compose-mode-map (kbd "C-1 c") 'message-goto-cc) ;; add search (define-key bjm-map (kbd "s") 'mu4e-headers-search)