New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to emacs mode in mu4e view mode #3464
Switch to emacs mode in mu4e view mode #3464
Conversation
hexagonal-sun
commented
Jun 25, 2020
Evil masks most of the keybindings that are set by mu4e-view-mode. Since this is a read-only buffer anyway use Emacs for that mode.
61e5d2f
to
e9c7f45
Compare
@hlissner Are you happy for this to get merged? Thanks! 👍 |
Thanks! |
In my experience the evil-collection keybindings work good enough - at least so far I did not mind them. This change surprised me, not sure about other mu4e users, but I will revert this in my private config. |
@agraul I found that several of my most commonly used key bindings where masked even when in evil mode. Case in point is I would also propose that since |
I see. I personally expect to be able to navigate inside the mail buffer with the same keybindings I use in other buffers, e.g. scrolling up and down with
It is still a buffer of text, just like opening a file read-only. I don't get why it should be handled differently from other read-only files. In the end, this is a subjective matter. Either way is good as long as the user is happy and I don't mind having this reverted in my personal config. I just wonder if this (breaking) change is necessary in Doom upstream. |
@agraul Then how about putting it in motion mode? (add-hook 'mu4e-view-mode-hook #'evil-motion-state) Evil's motion mode is meant as a "normal-lite". Evil's motions should be available, without many of the keybinds for extraneous plugins. |
Motion mode overrides quite a few of the default mu4e keybindings, but does not provide the evil-collections keybindings. I think this is actually the worst of the three discussed options. Someone else on Discord asked why this was decided so it seems I am not the only one that got surprised. I still think that using evil-collections' mu4e bindings should be the default for evil users. It can be overridden for evil users who prefer emacs bindings for mu4e in their personal configs and I think this is in more line with expectations than the other way around. Again, for me personally it is not that big of an issue and I just have it reverted, just thinking that the default should be the other way around. |
I just mask the few irritating evil bindings I've found, see https://tecosaur.github.io/emacs-config/config.html#viewing-mail,code--5 |
Understood. I've reverted it in 7a276db. |
## Changelog for doom-emacs: Commits: [doomemacs/doomemacs@15f0bccd...09248015](doomemacs/doomemacs@15f0bcc...0924801) * [`03add77b`](doomemacs/doomemacs@03add77) Elixir formats long numbers with an underscore * [`ad6da92f`](doomemacs/doomemacs@ad6da92) Update config.el * [`a282730c`](doomemacs/doomemacs@a282730) Fix typos and reword docstrings * [`205aed59`](doomemacs/doomemacs@205aed5) Update dart module README * [`f4c2c7f9`](doomemacs/doomemacs@f4c2c7f) Bump :lang org * [`6e600914`](doomemacs/doomemacs@6e60091) Bump :lang ruby * [`f8d3064e`](doomemacs/doomemacs@f8d3064) Bump :tools ansible * [`d70b2ff7`](doomemacs/doomemacs@d70b2ff) docs/faq: add "How to disable smartparens" doomemacs/doomemacs#3609 * [`316a9b87`](doomemacs/doomemacs@316a9b8) docs/faq: add "How to maximize/fullscreen at startup" * [`0ebb5cf3`](doomemacs/doomemacs@0ebb5cf) docs/faq: add "Why sharp-quote functions" * [`1e0cd6dd`](doomemacs/doomemacs@1e0cd6d) docs/faq: add "Is Doom a fork of spacemacs/prelude/etc?" * [`f99c3fb3`](doomemacs/doomemacs@f99c3fb) docs/faq: "Why is scrolling slow"->"Why is Emacs slow" * [`e6221844`](doomemacs/doomemacs@e622184) docs/faq: general revision & reformatting * [`e517da66`](doomemacs/doomemacs@e517da6) docs/api: fix "Centered frame" snippet * [`091635d5`](doomemacs/doomemacs@091635d) docs/api: add missing TOC entry * [`25008382`](doomemacs/doomemacs@2500838) Fix void-variable: lua-lsp-dir * [`cd40d45c`](doomemacs/doomemacs@cd40d45) docs/faq: minor corrections & revision * [`2bb88e24`](doomemacs/doomemacs@2bb88e2) docs/faq: Add "~/.emacs.d/server is unsafe" error * [`d2117b78`](doomemacs/doomemacs@d2117b7) docs/faq: add "How to share/sync config between computers" * [`87d17fab`](doomemacs/doomemacs@87d17fa) docs/getting_started: general revision * [`976a6017`](doomemacs/doomemacs@976a601) docs/getting_started: add install guides for Windows * [`9ec54284`](doomemacs/doomemacs@9ec5428) Set core.autocrlf = true in repos on Windows doomemacs/doomemacs#2637 * [`a78c3973`](doomemacs/doomemacs@a78c397) Add server/ to gitignore doomemacs/doomemacs#3324 * [`47a350f6`](doomemacs/doomemacs@47a350f) jinja2-enable-indent-on-save = nil doomemacs/doomemacs#3555 * [`61cb7252`](doomemacs/doomemacs@61cb725) Fix doomemacs/doomemacs#3509 again * [`bcc1b84e`](doomemacs/doomemacs@bcc1b84) Increase so-long threshold for softwrapped text modes * [`3aeb1778`](doomemacs/doomemacs@3aeb177) Add +literate-enable-recompile-h to enable save-on-tangle * [`ff21dfe5`](doomemacs/doomemacs@ff21dfe) Revise :config literate README * [`cd3c865c`](doomemacs/doomemacs@cd3c865) Bump :ui doom * [`7a276dbf`](doomemacs/doomemacs@7a276db) Restore evil keybinds for mu4e-view-mode doomemacs/doomemacs#3464 * [`2441d28a`](doomemacs/doomemacs@2441d28) Fix wrong-number-of-args error from cmd!! macro * [`afcf56a6`](doomemacs/doomemacs@afcf56a) Redesign dwim RET on org headings * [`807eb82b`](doomemacs/doomemacs@807eb82) docs/faq: add "How to make a new theme" * [`e6ae1d29`](doomemacs/doomemacs@e6ae1d2) Add support for pyright language server * [`99d5cd1f`](doomemacs/doomemacs@99d5cd1) Check +emacs-lisp-disable-flycheck-in-dirs against default-directory * [`b8a8ca9b`](doomemacs/doomemacs@b8a8ca9) Consider any window with no-other-window a popup * [`e71b7fc7`](doomemacs/doomemacs@e71b7fc) Revise comments in core.el * [`b2787a94`](doomemacs/doomemacs@b2787a9) Fix doomemacs/doomemacs#3627: persist auto-yasnippet snippets * [`711e6877`](doomemacs/doomemacs@711e687) config/literate: expand #+INCLUDE directives * [`8da31dbb`](doomemacs/doomemacs@8da31db) config/literate: update & revise readme * [`4b960393`](doomemacs/doomemacs@4b96039) bin/org-tangle: expand #+INCLUDE directives * [`d41df5f2`](doomemacs/doomemacs@d41df5f) editor/format: add README doomemacs/doomemacs#1166 * [`8c2026b4`](doomemacs/doomemacs@8c2026b) docs/getting_started: revise & expand "Writing your own modules" * [`135929d4`](doomemacs/doomemacs@135929d) docs/getting_started: fix heading hierarchy * [`69ce5d5e`](doomemacs/doomemacs@69ce5d5) docs/getting_started: update ToC * [`e1fc2db7`](doomemacs/doomemacs@e1fc2db) Disable line numbers in dashboard * [`6ca9e0e2`](doomemacs/doomemacs@6ca9e0e) Fix doomemacs/doomemacs#3632: wrong-number-of-args on setq-local * [`e7c21634`](doomemacs/doomemacs@e7c2163) Remove company-prescient * [`e52993fe`](doomemacs/doomemacs@e52993f) completion/company: update README's package list * [`0f39d7bd`](doomemacs/doomemacs@0f39d7b) lang/cc: remove unnecessary settings * [`e6979166`](doomemacs/doomemacs@e697916) Disable flycheck in racket-xp-mode * [`076cee4e`](doomemacs/doomemacs@076cee4) Revise +org--insert-item * [`12e414be`](doomemacs/doomemacs@12e414b) Rename +org/toggle-clock -> +org/toggle-last-clock * [`629c7bed`](doomemacs/doomemacs@629c7be) Rename λ! (deprecated) -> cmd! * [`b2e11f9a`](doomemacs/doomemacs@b2e11f9) Revise docstrings for org hooks * [`a5c509af`](doomemacs/doomemacs@a5c509a) lang/org: org-catch-invisible-edits = 'smart * [`cacc9d2e`](doomemacs/doomemacs@cacc9d2) lang/org: org-list-allow-alphabetical = t * [`ccfaf3f4`](doomemacs/doomemacs@ccfaf3f) Move auto-mode-alist fallbacks to bottom * [`87199113`](doomemacs/doomemacs@8719911) SPC f d -> +default/dired * [`8dfe8840`](doomemacs/doomemacs@8dfe884) docs/faq: add "My keybinds don't work" * [`6ebdbafb`](doomemacs/doomemacs@6ebdbaf) Bump :lang python * [`046dfb64`](doomemacs/doomemacs@046dfb6) lang/python: refactor lsp integration * [`0e732977`](doomemacs/doomemacs@0e73297) lang/org: fix edge case in +org--insert-item * [`ccccb976`](doomemacs/doomemacs@ccccb97) tools/magit: map Forge jumps in evil-mode * [`9c96feba`](doomemacs/doomemacs@9c96feb) Fix wrong-type-arg stringp error on +default/dired * [`af7f5d0f`](doomemacs/doomemacs@af7f5d0) tools/magit: merge Forge jumps with evil-magit * [`d8af5c3c`](doomemacs/doomemacs@d8af5c3) Support native compilation of packages * [`b9b987e1`](doomemacs/doomemacs@b9b987e) Optimize straight build step * [`57c08638`](doomemacs/doomemacs@57c0863) Fix aggressive native recompilation of packages * [`d1c2a444`](doomemacs/doomemacs@d1c2a44) [UI] Set prompt to readonly in comint buffers * [`1a6f5086`](doomemacs/doomemacs@1a6f508) Fix doomemacs/doomemacs#3504: evil-ex-substitute-global = nil * [`2e1775c4`](doomemacs/doomemacs@2e1775c) docs/api: fix inline command in map! example * [`095b3297`](doomemacs/doomemacs@095b329) Register workspace buffers opened via bookmark-jump * [`9c1a356a`](doomemacs/doomemacs@9c1a356) Update help keybinds in 'doom install' postamble * [`d006f76d`](doomemacs/doomemacs@d006f76) org-roam: check for sqlite3 executable in doctor * [`d2f7999c`](doomemacs/doomemacs@d2f7999) Don't close treemacs on ESC doomemacs/doomemacs#1970 * [`34e80471`](doomemacs/doomemacs@34e8047) Fix doomemacs/doomemacs#3645: stringp error starting up org-roam * [`edf5249d`](doomemacs/doomemacs@edf5249) Bump :tools lsp debugger * [`b604e38d`](doomemacs/doomemacs@b604e38) Bump :ui treemacs * [`048b086d`](doomemacs/doomemacs@048b086) Add calfw-cal dependency to allow local cal source * [`66e9b0af`](doomemacs/doomemacs@66e9b0a) Bump :lang gdscript * [`09248015`](doomemacs/doomemacs@0924801) Fix doomemacs/doomemacs#3650: void-variable tab-prefix-map
* email/mu4e: use Emacs mode when viewing mail Evil masks most of the keybindings that are set by mu4e-view-mode. Since this is a read-only buffer anyway use Emacs for that mode. * email: mu4e: replace `add-hook!' with `add-hook'
## Changelog for doom-emacs: Commits: [doomemacs/doomemacs@15f0bccd...09248015](doomemacs/doomemacs@15f0bcc...0924801) * [`03add77b`](doomemacs/doomemacs@03add77) Elixir formats long numbers with an underscore * [`ad6da92f`](doomemacs/doomemacs@ad6da92) Update config.el * [`a282730c`](doomemacs/doomemacs@a282730) Fix typos and reword docstrings * [`205aed59`](doomemacs/doomemacs@205aed5) Update dart module README * [`f4c2c7f9`](doomemacs/doomemacs@f4c2c7f) Bump :lang org * [`6e600914`](doomemacs/doomemacs@6e60091) Bump :lang ruby * [`f8d3064e`](doomemacs/doomemacs@f8d3064) Bump :tools ansible * [`d70b2ff7`](doomemacs/doomemacs@d70b2ff) docs/faq: add "How to disable smartparens" doomemacs/doomemacs#3609 * [`316a9b87`](doomemacs/doomemacs@316a9b8) docs/faq: add "How to maximize/fullscreen at startup" * [`0ebb5cf3`](doomemacs/doomemacs@0ebb5cf) docs/faq: add "Why sharp-quote functions" * [`1e0cd6dd`](doomemacs/doomemacs@1e0cd6d) docs/faq: add "Is Doom a fork of spacemacs/prelude/etc?" * [`f99c3fb3`](doomemacs/doomemacs@f99c3fb) docs/faq: "Why is scrolling slow"->"Why is Emacs slow" * [`e6221844`](doomemacs/doomemacs@e622184) docs/faq: general revision & reformatting * [`e517da66`](doomemacs/doomemacs@e517da6) docs/api: fix "Centered frame" snippet * [`091635d5`](doomemacs/doomemacs@091635d) docs/api: add missing TOC entry * [`25008382`](doomemacs/doomemacs@2500838) Fix void-variable: lua-lsp-dir * [`cd40d45c`](doomemacs/doomemacs@cd40d45) docs/faq: minor corrections & revision * [`2bb88e24`](doomemacs/doomemacs@2bb88e2) docs/faq: Add "~/.emacs.d/server is unsafe" error * [`d2117b78`](doomemacs/doomemacs@d2117b7) docs/faq: add "How to share/sync config between computers" * [`87d17fab`](doomemacs/doomemacs@87d17fa) docs/getting_started: general revision * [`976a6017`](doomemacs/doomemacs@976a601) docs/getting_started: add install guides for Windows * [`9ec54284`](doomemacs/doomemacs@9ec5428) Set core.autocrlf = true in repos on Windows doomemacs/doomemacs#2637 * [`a78c3973`](doomemacs/doomemacs@a78c397) Add server/ to gitignore doomemacs/doomemacs#3324 * [`47a350f6`](doomemacs/doomemacs@47a350f) jinja2-enable-indent-on-save = nil doomemacs/doomemacs#3555 * [`61cb7252`](doomemacs/doomemacs@61cb725) Fix doomemacs/doomemacs#3509 again * [`bcc1b84e`](doomemacs/doomemacs@bcc1b84) Increase so-long threshold for softwrapped text modes * [`3aeb1778`](doomemacs/doomemacs@3aeb177) Add +literate-enable-recompile-h to enable save-on-tangle * [`ff21dfe5`](doomemacs/doomemacs@ff21dfe) Revise :config literate README * [`cd3c865c`](doomemacs/doomemacs@cd3c865) Bump :ui doom * [`7a276dbf`](doomemacs/doomemacs@7a276db) Restore evil keybinds for mu4e-view-mode doomemacs/doomemacs#3464 * [`2441d28a`](doomemacs/doomemacs@2441d28) Fix wrong-number-of-args error from cmd!! macro * [`afcf56a6`](doomemacs/doomemacs@afcf56a) Redesign dwim RET on org headings * [`807eb82b`](doomemacs/doomemacs@807eb82) docs/faq: add "How to make a new theme" * [`e6ae1d29`](doomemacs/doomemacs@e6ae1d2) Add support for pyright language server * [`99d5cd1f`](doomemacs/doomemacs@99d5cd1) Check +emacs-lisp-disable-flycheck-in-dirs against default-directory * [`b8a8ca9b`](doomemacs/doomemacs@b8a8ca9) Consider any window with no-other-window a popup * [`e71b7fc7`](doomemacs/doomemacs@e71b7fc) Revise comments in core.el * [`b2787a94`](doomemacs/doomemacs@b2787a9) Fix doomemacs/doomemacs#3627: persist auto-yasnippet snippets * [`711e6877`](doomemacs/doomemacs@711e687) config/literate: expand #+INCLUDE directives * [`8da31dbb`](doomemacs/doomemacs@8da31db) config/literate: update & revise readme * [`4b960393`](doomemacs/doomemacs@4b96039) bin/org-tangle: expand #+INCLUDE directives * [`d41df5f2`](doomemacs/doomemacs@d41df5f) editor/format: add README doomemacs/doomemacs#1166 * [`8c2026b4`](doomemacs/doomemacs@8c2026b) docs/getting_started: revise & expand "Writing your own modules" * [`135929d4`](doomemacs/doomemacs@135929d) docs/getting_started: fix heading hierarchy * [`69ce5d5e`](doomemacs/doomemacs@69ce5d5) docs/getting_started: update ToC * [`e1fc2db7`](doomemacs/doomemacs@e1fc2db) Disable line numbers in dashboard * [`6ca9e0e2`](doomemacs/doomemacs@6ca9e0e) Fix doomemacs/doomemacs#3632: wrong-number-of-args on setq-local * [`e7c21634`](doomemacs/doomemacs@e7c2163) Remove company-prescient * [`e52993fe`](doomemacs/doomemacs@e52993f) completion/company: update README's package list * [`0f39d7bd`](doomemacs/doomemacs@0f39d7b) lang/cc: remove unnecessary settings * [`e6979166`](doomemacs/doomemacs@e697916) Disable flycheck in racket-xp-mode * [`076cee4e`](doomemacs/doomemacs@076cee4) Revise +org--insert-item * [`12e414be`](doomemacs/doomemacs@12e414b) Rename +org/toggle-clock -> +org/toggle-last-clock * [`629c7bed`](doomemacs/doomemacs@629c7be) Rename λ! (deprecated) -> cmd! * [`b2e11f9a`](doomemacs/doomemacs@b2e11f9) Revise docstrings for org hooks * [`a5c509af`](doomemacs/doomemacs@a5c509a) lang/org: org-catch-invisible-edits = 'smart * [`cacc9d2e`](doomemacs/doomemacs@cacc9d2) lang/org: org-list-allow-alphabetical = t * [`ccfaf3f4`](doomemacs/doomemacs@ccfaf3f) Move auto-mode-alist fallbacks to bottom * [`87199113`](doomemacs/doomemacs@8719911) SPC f d -> +default/dired * [`8dfe8840`](doomemacs/doomemacs@8dfe884) docs/faq: add "My keybinds don't work" * [`6ebdbafb`](doomemacs/doomemacs@6ebdbaf) Bump :lang python * [`046dfb64`](doomemacs/doomemacs@046dfb6) lang/python: refactor lsp integration * [`0e732977`](doomemacs/doomemacs@0e73297) lang/org: fix edge case in +org--insert-item * [`ccccb976`](doomemacs/doomemacs@ccccb97) tools/magit: map Forge jumps in evil-mode * [`9c96feba`](doomemacs/doomemacs@9c96feb) Fix wrong-type-arg stringp error on +default/dired * [`af7f5d0f`](doomemacs/doomemacs@af7f5d0) tools/magit: merge Forge jumps with evil-magit * [`d8af5c3c`](doomemacs/doomemacs@d8af5c3) Support native compilation of packages * [`b9b987e1`](doomemacs/doomemacs@b9b987e) Optimize straight build step * [`57c08638`](doomemacs/doomemacs@57c0863) Fix aggressive native recompilation of packages * [`d1c2a444`](doomemacs/doomemacs@d1c2a44) [UI] Set prompt to readonly in comint buffers * [`1a6f5086`](doomemacs/doomemacs@1a6f508) Fix doomemacs/doomemacs#3504: evil-ex-substitute-global = nil * [`2e1775c4`](doomemacs/doomemacs@2e1775c) docs/api: fix inline command in map! example * [`095b3297`](doomemacs/doomemacs@095b329) Register workspace buffers opened via bookmark-jump * [`9c1a356a`](doomemacs/doomemacs@9c1a356) Update help keybinds in 'doom install' postamble * [`d006f76d`](doomemacs/doomemacs@d006f76) org-roam: check for sqlite3 executable in doctor * [`d2f7999c`](doomemacs/doomemacs@d2f7999) Don't close treemacs on ESC doomemacs/doomemacs#1970 * [`34e80471`](doomemacs/doomemacs@34e8047) Fix doomemacs/doomemacs#3645: stringp error starting up org-roam * [`edf5249d`](doomemacs/doomemacs@edf5249) Bump :tools lsp debugger * [`b604e38d`](doomemacs/doomemacs@b604e38) Bump :ui treemacs * [`048b086d`](doomemacs/doomemacs@048b086) Add calfw-cal dependency to allow local cal source * [`66e9b0af`](doomemacs/doomemacs@66e9b0a) Bump :lang gdscript * [`09248015`](doomemacs/doomemacs@0924801) Fix doomemacs/doomemacs#3650: void-variable tab-prefix-map