[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-mime 2cbd5de7bd 100/118: general export options should
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-mime 2cbd5de7bd 100/118: general export options should always override buffer options |
Date: |
Wed, 5 Jan 2022 07:58:50 -0500 (EST) |
branch: elpa/org-mime
commit 2cbd5de7bd391fb0469a4c843f1880a0d73172b0
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
general export options should always override buffer options
---
org-mime.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/org-mime.el b/org-mime.el
index 02273877b7..7befee16b4 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -200,6 +200,12 @@ buffer holding the text to be exported.")
(defvar org-mime--saved-temp-window-config nil)
(defconst org-mime-src--hint "## org-mime hint: Press C-c C-c to commit
change.\n")
+(defun org-mime-get-buffer-export-options ()
+ "Get export options in buffer."
+ (or org-mime-export-options
+ (and (fboundp 'org-export--get-inbuffer-options)
+ (org-export--get-inbuffer-options))))
+
(defun org-mime-get-export-options (subtreep)
"SUBTREEP is t if current node is subtree."
(cond
@@ -208,9 +214,7 @@ buffer holding the text to be exported.")
(if (fboundp 'org-export--get-subtree-options)
(org-export--get-subtree-options))))
(t
- (or org-mime-export-options
- (if (fboundp 'org-export--get-inbuffer-options)
- (org-export--get-inbuffer-options))))))
+ (org-mime-get-buffer-export-options))))
(defun org-mime-current-line ()
"Get current line."
@@ -479,8 +483,7 @@ If called with an active region only export that region,
otherwise entire body."
(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)
- (org-export--get-inbuffer-options)))
+ (opts (org-mime-get-buffer-export-options))
(ascii-charset (org-mime-use-ascii-charset))
(plain (if ascii-charset
(progn
@@ -509,8 +512,8 @@ If called with an active region only export that region,
otherwise entire body."
(defun org-mime--get-buffer-title ()
"Get buffer title."
- (let* ((tmp (if (fboundp 'org-export--get-inbuffer-options)
- (plist-get (org-export--get-inbuffer-options) :title))))
+ (let* ((options (org-mime-get-buffer-export-options))
+ (tmp (and options (plist-get options :title))))
(when tmp
(let ((txt (car tmp)))
(set-text-properties 0 (length txt) nil txt)
- [nongnu] elpa/org-mime ea7a470872 061/118: add badge, (continued)
- [nongnu] elpa/org-mime ea7a470872 061/118: add badge, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 8de4bb693d 064/118: image could be nil, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime f8eac8ccde 066/118: restore plain text mail, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 95c33ec353 067/118: add screenshot, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 562cb5a3f0 074/118: Use compose-mail, rather than explicitly using message-mail, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 7475a592c2 081/118: drop emacs 24 support, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e81651d848 084/118: clean code, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 9bb6351b25 085/118: un-bundled htmlize.el, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 2581fc2dd9 091/118: org-mime-confirm-when-no-multipart function + docs, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 8ad1218456 095/118: Combine two insert calls, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 2cbd5de7bd 100/118: general export options should always override buffer options,
ELPA Syncer <=
- [nongnu] elpa/org-mime ecbc66f16a 106/118: fixed typo, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime c6a3d73e78 107/118: remove org-mime-default-header, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 04e6ce9db6 108/118: try fixing ci again, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime eb21c02ba8 109/118: fixed org subtree htmlize, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 21692f16ce 110/118: use buffer properties, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 59bf130c76 113/118: secure tag should be at the beginning of email body, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime df99e631c5 031/118: quoted mail use modern UI style, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime e5e4c59022 103/118: fixed some typo, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime 3b119a22be 112/118: handle file url on Windows elegantly, ELPA Syncer, 2022/01/05
- [nongnu] elpa/org-mime f7a45f5573 115/118: Upgrade test file to GPLv3, ELPA Syncer, 2022/01/05