diff --git a/modules/email/notmuch/README.org b/modules/email/notmuch/README.org index df2c3f275..f755666e2 100644 --- a/modules/email/notmuch/README.org +++ b/modules/email/notmuch/README.org @@ -19,17 +19,19 @@ - [[#sending-mail][Sending mail]] - [[#customize-notmuch-hello-buffer][Customize =*notmuch-hello*= buffer]] - [[#changing-the-notmuch-landing-page][Changing the =notmuch= landing page]] + - [[#writing-html-emails][Writing HTML Emails]] - [[#troubleshooting][Troubleshooting]] * Description This module turns Emacs into an email client using ~notmuch~. ** Module Flags ++ =+org= Enables org-mime for writing HTML emails using org-mode. + =+afew= Enables integration with =afew=. ** Plugins + [[https://notmuchmail.org/][notmuch]] -+ [[https://github.com/org-mime/org-mime][org-mime]] ++ [[https://github.com/org-mime/org-mime][org-mime]]* (with =+org= flag) + [[https://github.com/fuxialexander/counsel-notmuch][counsel-notmuch]]* + [[https://github.com/emacs-helm/helm-notmuch][helm-notmuch]]* @@ -169,5 +171,24 @@ a custom search as your landing page. #+BEGIN_SRC emacs-lisp (setq +notmuch-home-function (lambda () (notmuch-search "tag:inbox"))) #+END_SRC +** Writing HTML Emails +The [[https://github.com/org-mime/org-mime][org-mime]] package provides functionality for composing emails in org-mode and transforming them to HTML. This feature is enabled using the =+org= flag. + +Example use cases: + +- To convert an email to an HTML email use ~M-x org-mime-htmlize~ +- To compose email using an org-mode editor buffer, use ~M-x org-mime-edit-mail-in-org-mode~ + +If you'd like to make configuration changes to =org-mime=, you may do so normally. By default the output of =org-mime-htmlize= includes section numbers, a byline, and a table of contents. That's probably more formal than the emails you're used to sending, so here's some example configuration that turns those features off. + +/config.el/ + +#+begin_src emacs-lisp +(after! org-mime + (setq org-mime-export-options '(:section-numbers nil + :with-author nil + :with-toc nil))) +#+end_src + * TODO Troubleshooting diff --git a/modules/email/notmuch/config.el b/modules/email/notmuch/config.el index 333c1662a..34ec3f90d 100644 --- a/modules/email/notmuch/config.el +++ b/modules/email/notmuch/config.el @@ -88,6 +88,7 @@ OR a shell command string such as (use-package! org-mime + :when (featurep! +org) :after (org notmuch) :config (setq org-mime-library 'mml)) diff --git a/modules/email/notmuch/packages.el b/modules/email/notmuch/packages.el index a2710de8f..8da851ba7 100644 --- a/modules/email/notmuch/packages.el +++ b/modules/email/notmuch/packages.el @@ -2,7 +2,8 @@ ;;; email/notmuch/packages.el (package! notmuch :pin "63413a5563450bdedee4c077f2f998578e75083a") -(package! org-mime :pin "eb21c02ba8f97fe69c14dc657a7883b982664649") +(when (featurep! +org) + (package! org-mime :pin "eb21c02ba8f97fe69c14dc657a7883b982664649")) (when (featurep! :completion ivy) (package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688")) (when (featurep! :completion helm)