* contrib/lisp/org-mime.el (org-mime-replace-images): Change signature.
Always use temporary directory to create LaTeX images.
(org-mime-htmlize):
(org-mime-compose): Apply signature change above.
When exporting an org buffer with a LaTeX snippet including the Org
option "tex: dvipng" the images were always created in "/tmp/ltxpng/",
but the reported link in the htmlized buffer was the local "./ltxpng"
folder; so, unless the org file to htmlize was actually in "/tmp", the
user got an error saying that the image could not be found.
This was caused by the two different ways in which the function
`org-mime-replace-images' is used inside of
`org-mime-org-buffer-htmlize' and `org-mime-htmlize.'
To correct the problem, the function org-mime-replace-images doesn't
take anymore the current-file parameter (that was only used to get its
directory) and instead always creates a temporary directory using
temporary-file-directory.
* contrib/lisp/org-mime.el (org-mime-send-subtree, org-mime-compose):
`cl-letf' doesn't exist in Emacs <= 23, but `letf' won't exist in
future Emacs. Replace with `lambda' and `funcall'.
* org-mime.el (org-mime-change-element-style): Correctly capture the
HTML element instead of partially.
Passing element of "p" would end up matching and altering "pre"
elements as well. Need to properly anchor the regex to HTML elements.
TINYCHANGE
* contrib/lisp/org-mime.el (org-mime-htmlize, org-mime-compose): Use
new exporter.
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new
exporter.
* lisp/ob-latex.el (org-babel-execute:latex): Use new exporter.
* lisp/ob-org.el (org-babel-execute:org): Use new exporter.
* lisp/org-agenda.el (org-agenda-menu, org-agenda-write): Use new
iCalendar export back-end.
* lisp/org-table.el (org-table-export, orgtbl-export): Remove
dependency on `org-exp' library.
(org-table-clean-before-export): New function.
(org-table-colgroup-info): New variable.
(orgtbl-to-html): Use to new HTML export back-end.
* lisp/org.el (org-modules): Remove modules relative to obsolete
export framework and add those relative to the new one.
(org-create-formula-image-with-dvipng, org-format-latex
org-create-formula-image-with-imagemagick): Use new exporter.
(org-indent-line): INCLUDE keywords are indented like regular
keywords.
(org-mode-map): Bind C-c C-e to new export dispatcher.
(org-menu): Install new exporter in menu.
* contrib/lisp/org-mime.el (org-mime-file): Mark images included as
part of html portions as "disposition=inline".
(org-mime-multipart): When images are present wrap html and images
in a multipart/mixed structure.
(org-mime-htmlize): When images are present wrap html and images in
a multipart/mixed structure.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.
This commit also bumps the version number to 7.8.06.
The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
* contrib/lisp/org-mime.el (org-mime-use-property-inheritance): User
configurable variable to control inheritance of MAIL_ properties.
(org-mime-send-subtree): Using new custom variable.
(org-mime-subtree): Using new custom variable.
Suggested by Niels Giesen.
* contrib/lisp/org-mime.el (lambda): Removing the 'html-ascii hook as
each hook should be used for a single format.
(org-mime-compose): Making use of format specific hooks, and apply
each format hook individually to the body of each mime part as
appropriate.
Thanks to Ethan Ligon for suggesting this functionality.
An example hook such as the following will record when emails have
been composed
(add-hook 'org-mime-send-subtree-hook
(lambda ()
(org-entry-put (point) "mail_composed" (current-time-string))))
* contrib/lisp/org-mime.el (org-mime-send-subtree-hook): Hooks run
in the org-mode subtree when composing an email.
(org-mime-send-buffer-hook): Hooks run in the org-mode buffer when
composing an email.
Thanks to Niels Giesen for suggesting this change.
* contrib/lisp/org-mime.el (lambda): Adding format specific pre-export
hooks.
(org-mime-compose): Call pre-export hooks before export.
Much of this code is reworking of a very nice function shared on the
mailing list by Matt Lundin.
* contrib/lisp/org-mime.el (org-mime-htmlize): Fixed indentation.
(org-mime-try): Short macro for safely checking for properties.
(org-mime-send-subtree): Drops the current subtree into a mail
buffer possible exported and mime-encoded.
(org-mime-send-buffer): Drops the current buffer into a mail
buffer possible exported and mime-encoded.
(org-mime-compose): Exports and mime-encodes a string of org-mode
text for sending via email.
(org-mime-org-buffer-htmlize): Create an email buffer containing the
current org-mode file exported to html and encoded in both html and
in org formats as mime alternatives.
(org-mime-subtree): Create an email buffer containing the current
org-mode subtree exported to a org format or to the format specified
by the MAIL_FMT property of the subtree.
The attached patch adds a new functions org-export-string.
,----
| org-export-string is a Lisp function in `org-exp.el'.
|
| (org-export-string STRING FMT &optional DIR)
|
| Export STRING to FMT using existing export facilities.
| During export STRING is saved to a temporary file whose location
| could vary. Optional argument DIR can be used to force the
| directory in which the temporary file is created during export
| which can be useful for resolving relative paths. Dir defaults
| to the value of `temporary-file-directory'.
`----
This function should be useful in user code, and can already reduce the
amount of code in ob-org.el and org-mime.el.
>From e51017e4d7051aad31384a470f0a695dca0d6716 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Sun, 17 Oct 2010 15:17:13 -0600
Subject: [PATCH] org-export-string -- exports a string of org-mode markup text
* lisp/org-exp.el (org-export-string): new function org-export-string
can be used to convert a string of test in org-mode markup to a
specified format
* contrib/lisp/org-mime.el (org-mime-htmlize): now using new
org-export-string function for exportation
* lisp/ob-org.el (org-babel-execute:org): now using new
org-export-string function for exportation
Thanks to Ethan Ligon for pointing this out
* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): fixed major
error -- was exporting entire as text/plain mime part, now when
region is active, only that region is exported