diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2010-12-16 18:12:08 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-12-16 18:12:08 -0700 |
commit | 3c66db85f0a7869d83e3d8ea8f61c75e0b15993c (patch) | |
tree | c166dc0409b255d60788c172ceba11f8c2b3a06b | |
parent | f8000a9bc14ff9c30c949b1bad425de875c49bdf (diff) | |
download | org-mode-3c66db85f0a7869d83e3d8ea8f61c75e0b15993c.tar.gz |
org-mime: Use new org-export-string function
* contrib/lisp/org-mime.el (org-mime-htmlize): Use new
org-export-string function.
(org-mime-org-buffer-htmlize): Use new org-export-string function.
-rw-r--r-- | contrib/lisp/org-mime.el | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el index bca6e91..736dee6 100644 --- a/contrib/lisp/org-mime.el +++ b/contrib/lisp/org-mime.el @@ -175,7 +175,7 @@ export that region, otherwise export the entire body." (point-max))) (raw-body (buffer-substring html-start html-end)) (tmp-file (make-temp-name (expand-file-name "mail" temporary-file-directory))) - (body (org-export-string raw-body "org" (file-name-directory tmp-file))) + (body (org-export-string raw-body 'org (file-name-directory tmp-file))) ;; because we probably don't want to skip part of our mail (org-export-skip-text-before-1st-heading nil) ;; because we probably don't want to export a huge style file @@ -185,7 +185,7 @@ export that region, otherwise export the entire body." ;; to hold attachments for inline html images (html-and-images (org-mime-replace-images - (org-export-string raw-body "html" (file-name-directory tmp-file)) + (org-export-string raw-body 'html (file-name-directory tmp-file)) tmp-file)) (html-images (unless arg (cdr html-and-images))) (html (org-mime-apply-html-hook @@ -222,10 +222,7 @@ handling with appropriate MIME encoding." (point-max))) (temp-body-file (make-temp-file "org-mime-export")) (raw-body (buffer-substring html-start html-end)) - (body (with-temp-buffer - (insert raw-body) - (write-file temp-body-file) - (org-export-as-org nil nil nil 'string t))) + (body (org-export-string raw-body 'org)) (org-link-file-path-type 'absolute) ;; because we probably don't want to export a huge style file (org-export-htmlize-output-type 'inline-css) @@ -242,4 +239,4 @@ handling with appropriate MIME encoding." (mapconcat 'identity html-images "\n")) (delete-file temp-body-file)))) -(provide 'org-mime)
\ No newline at end of file +(provide 'org-mime) |