[Emacs] Better mu4e, nov-mode config
Better formatting for `eshell-info-banner' bookmark Unbind some keys for some keymaps Better face for replied to emails Remove useless `progn' Go from `:general' to `general-define-key'. For some reason, the former seems to not perform correctly.
This commit is contained in:
parent
59362050d1
commit
8604abc87d
@ -1221,7 +1221,9 @@ We can finally define our bookmarks! The code reads as follows:
|
|||||||
:query ,(format "%s AND %s"
|
:query ,(format "%s AND %s"
|
||||||
<<mu4e-bookmarks-inbox-filters>>
|
<<mu4e-bookmarks-inbox-filters>>
|
||||||
<<mu4e-bookmarks-filter-uni>>))
|
<<mu4e-bookmarks-filter-uni>>))
|
||||||
(:name "eshell-info-banner" :key ?E :query ,(format "%s AND %s"
|
(:name "eshell-info-banner"
|
||||||
|
:key ?E
|
||||||
|
:query ,(format "%s AND %s"
|
||||||
<<mu4e-bookmarks-inbox-filters>>
|
<<mu4e-bookmarks-inbox-filters>>
|
||||||
"list:eshell-info-banner.el.Phundrak.github.com"))
|
"list:eshell-info-banner.el.Phundrak.github.com"))
|
||||||
(:name "Sent" :key ?s :query "maildir:/Sent")
|
(:name "Sent" :key ?s :query "maildir:/Sent")
|
||||||
@ -1324,10 +1326,12 @@ bépo layout: ~hjkl~ becomes ~ctsr~ for us. Let’s undefine some of these:
|
|||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:keymaps '(mu4e-headers-mode-map mu4e-view-mode-map)
|
:keymaps '(mu4e-headers-mode-map mu4e-view-mode-map)
|
||||||
|
"SPC" nil
|
||||||
"s" nil)
|
"s" nil)
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:states 'normal
|
:states 'normal
|
||||||
:keymaps '(mu4e-headers-mode-map mu4e-view-mode-map)
|
:keymaps '(mu4e-headers-mode-map mu4e-view-mode-map)
|
||||||
|
"SPC" nil
|
||||||
"s" nil
|
"s" nil
|
||||||
"," nil)
|
"," nil)
|
||||||
(general-define-key
|
(general-define-key
|
||||||
@ -1529,7 +1533,7 @@ the major-mode leader and call a simple function.
|
|||||||
(use-package org-msg
|
(use-package org-msg
|
||||||
:after (org mu4e)
|
:after (org mu4e)
|
||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:hook (mu4e-compose-pre . org-msg-mode)
|
:hook ((mu4e-compose-pre . org-msg-mode))
|
||||||
:general (:keymaps 'org-msg-edit-mode-map
|
:general (:keymaps 'org-msg-edit-mode-map
|
||||||
:prefix ","
|
:prefix ","
|
||||||
:states 'normal
|
:states 'normal
|
||||||
@ -1539,9 +1543,9 @@ the major-mode leader and call a simple function.
|
|||||||
"k" #'message-kill-buffer
|
"k" #'message-kill-buffer
|
||||||
"s" #'message-dont-send
|
"s" #'message-dont-send
|
||||||
"f" #'org-msg-attach)
|
"f" #'org-msg-attach)
|
||||||
|
:custom-face
|
||||||
|
(mu4e-replied-face ((t (:weight normal :foreground "#b48ead"))))
|
||||||
:config
|
:config
|
||||||
(progn
|
|
||||||
(defun my/org-msg-signature-convert (orig-fun &rest args)
|
(defun my/org-msg-signature-convert (orig-fun &rest args)
|
||||||
"Tweak my signature when replying as plain/text only."
|
"Tweak my signature when replying as plain/text only."
|
||||||
(let ((res (apply orig-fun args)))
|
(let ((res (apply orig-fun args)))
|
||||||
@ -1551,7 +1555,7 @@ the major-mode leader and call a simple function.
|
|||||||
res))
|
res))
|
||||||
(advice-add 'org-msg-composition-parameters
|
(advice-add 'org-msg-composition-parameters
|
||||||
:around 'my/org-msg-signature-convert)
|
:around 'my/org-msg-signature-convert)
|
||||||
|
(add-hook 'mu4e-headers-mode (lambda () (toggle-truncate-lines -1)))
|
||||||
(setq org-msg-startup "inlineimages"
|
(setq org-msg-startup "inlineimages"
|
||||||
org-msg-default-alternatives '((new . (text html))
|
org-msg-default-alternatives '((new . (text html))
|
||||||
(reply-to-html . (text html))
|
(reply-to-html . (text html))
|
||||||
@ -1559,6 +1563,7 @@ the major-mode leader and call a simple function.
|
|||||||
org-msg-convert-citation t
|
org-msg-convert-citation t
|
||||||
org-msg-greeting-name-limit 3
|
org-msg-greeting-name-limit 3
|
||||||
org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature"
|
org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature"
|
||||||
|
(replace-regexp-in-string (regexp-quote "\n") "\n\n"
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents mail-signature-file)
|
(insert-file-contents mail-signature-file)
|
||||||
(buffer-string))))))
|
(buffer-string))))))
|
||||||
@ -1597,8 +1602,9 @@ reader?
|
|||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:defer t
|
:defer t
|
||||||
:mode ("\\.epub\\'" . nov-mode)
|
:mode ("\\.epub\\'" . nov-mode)
|
||||||
:general
|
:config
|
||||||
(:keymaps 'nov-mode-map
|
(general-define-key
|
||||||
|
:keymaps 'nov-mode-map
|
||||||
:states 'normal
|
:states 'normal
|
||||||
"SPC" nil
|
"SPC" nil
|
||||||
"c" #'nov-previous-document
|
"c" #'nov-previous-document
|
||||||
@ -1614,7 +1620,6 @@ reader?
|
|||||||
"gt" #'nov-goto-toc
|
"gt" #'nov-goto-toc
|
||||||
"gv" #'nov-view-source
|
"gv" #'nov-view-source
|
||||||
"gV" #'nov-view-content-source)
|
"gV" #'nov-view-content-source)
|
||||||
:config
|
|
||||||
(setq nov-text-width 95))
|
(setq nov-text-width 95))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user