[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-mime 1162095645 086/118: Catch signature in html conve
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-mime 1162095645 086/118: Catch signature in html convert |
Date: |
Wed, 5 Jan 2022 07:58:49 -0500 (EST) |
branch: elpa/org-mime
commit 11620956452002e968d0a1b8de1b63217927555a
Author: Çağlar Girit <caglargirit@gmail.com>
Commit: Çağlar Girit <caglargirit@gmail.com>
Catch signature in html convert
---
org-mime.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/org-mime.el b/org-mime.el
index 852103216d..8f46516400 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -166,6 +166,11 @@ Default (nil) selects the original org-mode file."
:group 'org-mime
:type 'sexp)
+(defcustom org-mime-mail-signature-separator "--"
+ "Default mail signature separator."
+ :group 'org-mime
+ :type 'string)
+
(defvar org-mime-export-options '(:with-latex dvipng)
"Default export options which may override org buffer/subtree options.
You avoid exporting section-number/author/toc with the setup below,
@@ -442,6 +447,12 @@ CURRENT-FILE is used to calculate full path of images."
(search-forward mail-header-separator)
(+ (point) 1)))
+(defun org-mime-mail-signature-begin ()
+ "Find start of signature line in email."
+ (save-excursion
+ (goto-char (point-max))
+ (search-backward org-mime-mail-signature-separator nil t nil)))
+
;;;###autoload
(defun org-mime-htmlize ()
"Export a portion of an email to html using `org-mode'.
@@ -453,8 +464,9 @@ If called with an active region only export that region,
otherwise entire body."
(or (and region-p (region-beginning))
(org-mime-mail-body-begin))))
(html-end (or (and region-p (region-end))
- ;; TODO: should catch signature...
- (point-max)))
+ (or
+ (org-mime-mail-signature-begin)
+ (point-max))))
(org-text (buffer-substring html-start html-end))
;; to hold attachments for inline html images
(opts (if (fboundp 'org-export--get-inbuffer-options)
- [nongnu] elpa/org-mime 80b4e3a3b4 008/118: add readme, (continued)
- [nongnu] elpa/org-mime 80b4e3a3b4 008/118: add readme, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime fb265448df 038/118: Merge pull request #14 from unhammer/issue13-OPTIONS-noise, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 0752659f7a 042/118: No drawer exporting (default since Emacs 25), ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime db707a7337 040/118: Merge pull request #15 from unhammer/patch-1, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime bc61d4de7d 045/118: Merge pull request #18 from jkitchin/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 7e89b4b741 053/118: move cond out of the cleanup function, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 7bcb075550 060/118: CI and TDD, fixed some minor bug. bump 0.1.2, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 286330fa15 069/118: fixed: LaTeX fragment not exported correctly, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 6c7ddeaade 068/118: fixed CI, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 73c13fdd0b 075/118: Merge pull request #39 from czan/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 1162095645 086/118: Catch signature in html convert,
ELPA Syncer <=
- [nongnu] elpa/org-mime 722a295672 088/118: Merge pull request #48 from ahttraga/sigfix, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 168fe3a6a1 092/118: Merge pull request #51 from borwickatuw/master, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 4e5d50789b 097/118: Clean up name of test file in comment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 73fdd3f40d 098/118: Merge pull request #53 from tomheon/clean-up-test-header, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime d71f57dc0d 096/118: Add a simple test for quoting of multi-line paragraphs, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 5df12989cd 101/118: clean code, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime d725955399 105/118: stop bundling htmlize, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e5345ae5b6 104/118: fixed ci, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 23cc52bb53 111/118: donot htmlize security signature and attachment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime d52a7b52b6 114/118: fixed revert plain text email bug, ELPA Syncer, 2022/01/05