summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:35 +0200
committerS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:35 +0200
commit361fd4da7cfa870165cb1ec175cdbea55ca40e7e (patch)
treea36bfd91d9e14c354b6eaebb20f5d5d64ec438db /contrib
parent77ddd382df838e38504b822e729250b2a6dd9b63 (diff)
Imported Upstream version 8.2.7a
Diffstat (limited to 'contrib')
-rw-r--r--contrib/lisp/org-mime.el17
-rw-r--r--contrib/lisp/ox-koma-letter.el2
2 files changed, 12 insertions, 7 deletions
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index b0007ac..44bf91b 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -163,10 +163,13 @@ and images in a multipart/related part."
('semi (concat
"--" "<<alternative>>-{\n"
"--" "[[text/plain]]\n" plain
- (when images (concat "--" "<<alternative>>-{\n"))
- "--" "[[text/html]]\n" html
- images
- (when images (concat "--" "}-<<alternative>>\n"))
+ (if (and images (> (length images) 0))
+ (concat "--" "<<related>>-{\n"
+ "--" "[[text/html]]\n" html
+ images
+ "--" "}-<<related>>\n")
+ (concat "--" "[[text/html]]\n" html
+ images))
"--" "}-<<alternative>>\n"))
('vm "?")))
@@ -269,8 +272,10 @@ export that region, otherwise export the entire body."
(defun org-mime-send-buffer (&optional fmt)
(run-hooks 'org-mime-send-buffer-hook)
(let* ((region-p (org-region-active-p))
- (subject (org-export-grab-title-from-buffer))
- (file (buffer-file-name (current-buffer)))
+ (file (buffer-file-name (current-buffer)))
+ (subject (if (not file) (buffer-name (buffer-base-buffer))
+ (file-name-sans-extension
+ (file-name-nondirectory file))))
(body-start (or (and region-p (region-beginning))
(save-excursion (goto-char (point-min)))))
(body-end (or (and region-p (region-end)) (point-max)))
diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index a42a3a5..1755fbe 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -304,7 +304,7 @@ A headline is only used if #+OPENING is not set. See also
org-latex-default-class) t)
(:author "AUTHOR" nil (org-koma-letter--get-value org-koma-letter-author) t)
(:author-changed-in-buffer-p "AUTHOR" nil nil t)
- (:from-address "FROM_ADDRESS" nil nil newline)
+ (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline)
(:phone-number "PHONE_NUMBER" nil org-koma-letter-phone-number)
(:email "EMAIL" nil (org-koma-letter--get-value org-koma-letter-email) t)
(:email-changed-in-buffer-p "EMAIL" nil nil t)