mirror of
https://github.com/djcb/mu.git
synced 2024-06-25 07:28:02 +02:00
Updated html export to org v8 standards
Replaced use of org-export-string with org-export-string-as to match updated org coding standards. This specifically addresses issue #391
This commit is contained in:
parent
ff25bf1a25
commit
ea5e9b6b3b
|
@ -151,8 +151,8 @@ and images in a multipart/related part."
|
||||||
|
|
||||||
(defun org~mu4e-mime-convert-to-html ()
|
(defun org~mu4e-mime-convert-to-html ()
|
||||||
"Convert the current body to html."
|
"Convert the current body to html."
|
||||||
(unless (fboundp 'org-export-string)
|
(unless (fboundp 'org-export-string-as)
|
||||||
(mu4e-error "require function 'org-export-string not found."))
|
(mu4e-error "require function 'org-export-string-as not found."))
|
||||||
(unless (executable-find "dvipng")
|
(unless (executable-find "dvipng")
|
||||||
(mu4e-error "Required program dvipng not found"))
|
(mu4e-error "Required program dvipng not found"))
|
||||||
(let* ((begin
|
(let* ((begin
|
||||||
|
@ -163,8 +163,7 @@ and images in a multipart/related part."
|
||||||
(raw-body (buffer-substring begin end))
|
(raw-body (buffer-substring begin end))
|
||||||
(tmp-file (make-temp-name (expand-file-name "mail"
|
(tmp-file (make-temp-name (expand-file-name "mail"
|
||||||
temporary-file-directory)))
|
temporary-file-directory)))
|
||||||
(body (org-export-string raw-body 'org
|
(body (org-export-string-as raw-body 'html t))
|
||||||
(file-name-directory tmp-file)))
|
|
||||||
;; because we probably don't want to skip part of our mail
|
;; because we probably don't want to skip part of our mail
|
||||||
(org-export-skip-text-before-1st-heading nil)
|
(org-export-skip-text-before-1st-heading nil)
|
||||||
;; because we probably don't want to export a huge style file
|
;; because we probably don't want to export a huge style file
|
||||||
|
@ -176,8 +175,7 @@ and images in a multipart/related part."
|
||||||
;; to hold attachments for inline html images
|
;; to hold attachments for inline html images
|
||||||
(html-and-images
|
(html-and-images
|
||||||
(org~mu4e-mime-replace-images
|
(org~mu4e-mime-replace-images
|
||||||
(org-export-string raw-body 'html
|
(org-export-string-as raw-body 'html t)
|
||||||
(file-name-directory tmp-file))
|
|
||||||
tmp-file))
|
tmp-file))
|
||||||
(html-images (cdr html-and-images))
|
(html-images (cdr html-and-images))
|
||||||
(html (car html-and-images)))
|
(html (car html-and-images)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user