emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-mime 7c3483b2b0 030/118: sample for advanced setup


From: ELPA Syncer
Subject: [nongnu] elpa/org-mime 7c3483b2b0 030/118: sample for advanced setup
Date: Wed, 5 Jan 2022 07:58:44 -0500 (EST)

branch: elpa/org-mime
commit 7c3483b2b0ac6bc2bcee250f43dbea291bfa45d6
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>

    sample for advanced setup
---
 README.org  |  7 +++++++
 org-mime.el | 10 +++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index e6bf628694..02f058129a 100644
--- a/README.org
+++ b/README.org
@@ -77,6 +77,13 @@ For those who use color themes with Dark backgrounds it is 
useful to set a dark
              "blockquote" "border-left: 2px solid gray; padding-left: 4px;")))
 #+end_src
 
+Render text between "@" in red color, you can use `org-mime-html-hook',
+#+begin_src elisp
+(add-hook 'org-mime-html-hook
+          (lambda ()
+            (while (re-search-forward "@\\([^@]*\\)@" nil t)
+              (replace-match "<span style=\"color:red\">\\1</span>"))))
+#+end_src
 For other customization options see the org-mime customization group.
 ** Export options
 To avoid exporting TOC, you can setup `org-mime-export-options',
diff --git a/org-mime.el b/org-mime.el
index 93bada66f6..ca8d05d149 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -81,8 +81,16 @@
 ;;             (lambda ()
 ;;               (local-set-key (kbd "C-c M-o") 'org-mime-org-buffer-htmlize)))
 ;;
-;; In order to embed image into your mail, use below org syntax,
+;; Extra Tips:
+;; 1. In order to embed image into your mail, use below org syntax,
 ;;   [[/full/path/to/your.jpg]]
+;;
+;; 2. It's easy to add your own emphasis symbol.  For example, in order to 
render
+;; text between "@" in red color, you can use `org-mime-html-hook':
+;;   (add-hook 'org-mime-html-hook
+;;             (lambda ()
+;;               (while (re-search-forward "@\\([^@]*\\)@" nil t)
+;;                 (replace-match "<span style=\"color:red\">\\1</span>"))))
 
 ;;; Code:
 (require 'cl-lib)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]