diff options
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/settings/init-mu4e.el | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/emacs/settings/init-mu4e.el b/emacs/settings/init-mu4e.el index 7c70146..59ffe6f 100644 --- a/emacs/settings/init-mu4e.el +++ b/emacs/settings/init-mu4e.el @@ -180,25 +180,10 @@ (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) - ; Webkit support for viewing HTML emails. See the following discussion: - ; https://groups.google.com/forum/#!topic/mu-discuss/JqHEGycEyKI - (defun my-mu4e-action-view-with-xwidget (msg) - "View the body of the message inside xwidget-webkit." - (unless (fboundp 'xwidget-webkit-browse-url) - (mu4e-error "No xwidget support available")) - (let* ((html (mu4e-message-field msg :body-html)) - (txt (mu4e-message-field msg :body-txt)) - (tmpfile (format "%s%x.html" temporary-file-directory (random t)))) - (unless (or html txt) - (mu4e-error "No body part for this message")) - (with-temp-buffer - ;; simplistic -- but note that it's only an example... - (insert (or html (concat "<pre>" txt "</pre>"))) - (write-file tmpfile) - (xwidget-webkit-browse-url (concat "file://" tmpfile) t)))) - + ; As of 0.9.18 and GNU Emacs 25, the mu4e-action-with-xwidget can be used to + ; render an HTML message with Webkit. (add-to-list 'mu4e-view-actions - '("xViewXWidget" . my-mu4e-action-view-with-xwidget) t) + '("webkit" . mu4e-action-view-with-xwidget)) ;; Addings hooks for composing and viewing messages. |
