Skip to content

Commit

Permalink
fix(mu4e): fixes related to evil-collection
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Mar 27, 2023
1 parent b3588e9 commit 56533ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions core/me-evil.el
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@

;; TEMP: Fix `mu4e' evil integraion
(with-eval-after-load 'mu4e
(require 'loadhist) ; to use `feature-file'

;; To avoid calling `evil-collection-mu4e--main-action-str'
(defvar evil-collection-mu4e-new-region-basic nil)

(require 'evil-collection-mu4e
(concat (file-name-directory (feature-file 'evil-collection))
"modes/mu4e/evil-collection-mu4e.el"))

(evil-collection-mu4e-set-state)
(evil-collection-mu4e-set-bindings)

Expand Down
18 changes: 9 additions & 9 deletions modules/extras/me-mu4e-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,15 @@ will also be the width of all other printable characters."
;; Evil collection overwrite the jump, search, compose and quit commands
;; TODO: Useless now, to be updated/deleted when `evil-collection-mu4e' gets
;; fixed.
(with-eval-after-load 'evil-collection
(setq evil-collection-mu4e-new-region-basic
(concat (+mu4e--main-action-prettier-a
"\t* [J]ump to some maildir\n" 'mu4e-search-maildir)
(+mu4e--main-action-prettier-a
"\t* Enter a [s]earch query\n" 'mu4e-search)
(+mu4e--main-action-prettier-a
"\t* [C]ompose a new message\n" 'mu4e-compose-new))
evil-collection-mu4e-end-region-misc "quit"))
;; (with-eval-after-load 'evil-collection
;; (setq evil-collection-mu4e-new-region-basic
;; (concat (+mu4e--main-action-prettier-a
;; "\t* [J]ump to some maildir\n" 'mu4e-search-maildir)
;; (+mu4e--main-action-prettier-a
;; "\t* Enter a [s]earch query\n" 'mu4e-search)
;; (+mu4e--main-action-prettier-a
;; "\t* [C]ompose a new message\n" 'mu4e-compose-new))
;; evil-collection-mu4e-end-region-misc "quit"))

(advice-add #'mu4e--key-val :filter-return #'+mu4e--main-keyval-str-prettier-a)
(advice-add #'mu4e--main-action :override #'+mu4e--main-action-prettier-a))
Expand Down

0 comments on commit 56533ad

Please sign in to comment.