Make reply work with org-mu4e-mode
This commit is contained in:
parent
888a8158d9
commit
22c70eaaa6
@ -219,6 +219,32 @@ passed to it."
|
||||
(cl-letf (((symbol-function 'mu4e-compose-mode) 'org-mu4e-compose-mode))
|
||||
(apply 'mu4e-compose-new r))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-mu4e-compose-reply-to (&optional to wide)
|
||||
"This is like `mu4e-compose-reply-to', but utilizes `org-mu4e-compose-mode'.
|
||||
TO and WIDE are the same as `mu4e-compose-reply-to'."
|
||||
(interactive)
|
||||
;; Save local variables set by `mu4e-compose-reply-to'
|
||||
(let ((html-part-p (seq-find (lambda (handle)
|
||||
(equal (mm-handle-media-type (cdr handle))
|
||||
"text/html"))
|
||||
gnus-article-mime-handle-alist))
|
||||
(org-mu4e--internal-message-mode-function
|
||||
(symbol-function 'mu4e-compose-mode)))
|
||||
(cl-letf (((symbol-function 'mu4e-compose-mode) 'org-mu4e-compose-mode))
|
||||
(let ((buf (mu4e-compose-reply-to to wide)))
|
||||
(with-current-buffer buf
|
||||
(setq org-mu4e--html-message-p
|
||||
;; make the variable look nicer by not having random data in it
|
||||
(not (not html-part-p))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-mu4e-compose-reply (&optional wide)
|
||||
"This is like `mu4e-compose-reply', but utilizes `org-mu4e-compose-mode'.
|
||||
WIDE is the same as `mu4e-compose-reply'."
|
||||
(interactive "P")
|
||||
(org-mu4e-compose-reply-to nil wide))
|
||||
|
||||
;;;###autoload
|
||||
(defvar-keymap org-mu4e-compose-mode-map
|
||||
:parent org-mode-map
|
||||
|
6
init.el
6
init.el
@ -2127,6 +2127,12 @@ The name is compared with the field name using TESTFN (defaults to `equal')."
|
||||
"ZD" #'message-dont-send
|
||||
"ZQ" #'message-kill-buffer
|
||||
"ZF" #'mml-attach-file)
|
||||
(evil-define-key 'normal mu4e-view-mode-map
|
||||
"R" 'org-mu4e-compose-reply
|
||||
"cr" 'org-mu4e-compose-reply)
|
||||
(evil-define-key 'normal mu4e-headers-mode-map
|
||||
"R" 'org-mu4e-compose-reply
|
||||
"cr" 'org-mu4e-compose-reply)
|
||||
(defun my/-setup-org-mu4e-compose-mode ()
|
||||
"Setup up stuff in `org-mu4e-compose' buffers."
|
||||
(setq-local ltex-eglot-variable-save-method 'file)
|
||||
|
Loading…
Reference in New Issue
Block a user