[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-mime f1175e3fab 035/118: can htmlize new mail
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-mime f1175e3fab 035/118: can htmlize new mail |
Date: |
Wed, 5 Jan 2022 07:58:44 -0500 (EST) |
branch: elpa/org-mime
commit f1175e3faba25d3f862a43392b69854cdd18be9d
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
can htmlize new mail
---
org-mime.el | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/org-mime.el b/org-mime.el
index 4a243482d5..776273b979 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -282,11 +282,21 @@ You could use either `org-up-heading-safe' or
`org-back-to-heading'.")
"<p>[\n\r]*>>>>> .* ==
\\([^\r\n]*\\)[\r\n]*</p>"
"<div class=\"gmail_quote\">\\1</div>"
html))
- (setq info (org-mime-encode-quoted-mail-body))
- (delete-region (nth 0 info) (nth 1 info))
- (goto-char (nth 0 info))
- (insert (nth 2 info))
- (buffer-substring-no-properties (point-min) (point-max)))))
+ (unwind-protect
+ (let (retval)
+ (condition-case ex
+ (setq info (org-mime-encode-quoted-mail-body))
+ (setq retval info)
+ ('error (setq info nil)))
+ retval))
+ (cond
+ (info
+ (delete-region (nth 0 info) (nth 1 info))
+ (goto-char (nth 0 info))
+ (insert (nth 2 info))
+ (buffer-substring-no-properties (point-min) (point-max)))
+ (t
+ html)))))
(t
html)))
@@ -295,13 +305,13 @@ You could use either `org-up-heading-safe' or
`org-back-to-heading'.")
If html portion of message includes IMAGES they are wrapped in
multipart/related part."
(cl-case org-mime-library
(mml (concat "<#multipart type=alternative><#part type=text/plain>"
- plain
- (when images "<#multipart type=related>")
- "<#part type=text/html>"
- (org-mime-cleanup-quoted html)
- images
- (when images "<#/multipart>\n")
- "<#/multipart>\n"))
+ plain
+ (when images "<#multipart type=related>")
+ "<#part type=text/html>"
+ (org-mime-cleanup-quoted html)
+ images
+ (when images "<#/multipart>\n")
+ "<#/multipart>\n"))
(semi (concat
"--" "<<alternative>>-{\n"
"--" "[[text/plain]]\n" plain
- [nongnu] elpa/org-mime e9b0be2860 005/118: mails need NO TOC, (continued)
- [nongnu] elpa/org-mime e9b0be2860 005/118: mails need NO TOC, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 3a16180195 006/118: clean code according to org-mode review, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 351b233a7e 018/118: Don't use obsoleted function, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 44e7a78ffd 019/118: Fix for cl-lib, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime dfe41e05e2 012/118: Merge pull request #1 from acowley/subject, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime d3ae6df753 013/118: Merge pull request #2 from acowley/subtree, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 957bb3b43a 014/118: Merge pull request #3 from acowley/plain-part, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime b00d23aa1d 022/118: explicitly require org export libs, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime d540da37df 026/118: make it emacs 24.3 compatible, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime c0e99cfdfa 028/118: README, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime f1175e3fab 035/118: can htmlize new mail,
ELPA Syncer <=
- [nongnu] elpa/org-mime 895a7c31bb 052/118: Merge pull request #23 from liujoey/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 11965c407f 055/118: rewrite beautify function, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime cf7dbea171 054/118: rename cleanup function to match beautify user option, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 53e0c8141b 058/118: one-line fix for klipse errors in org-mime, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime baa6cde22f 057/118: Merge pull request #25 from tmurph/blockquote-parser, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 1b516d604a 056/118: remove unnecessary dependency, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 817744f3b1 062/118: remove plain text body, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 4bd5d55ba9 071/118: fixed logic, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime dd9dac74cc 073/118: doc on html export, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime d827dbfb97 077/118: Add option to export ASCII for text/plain section, ELPA Syncer, 2022/01/05