These languages are capable of writing results to file; for several of
them this is their only mode of operation. These changes cause the
languages to return to ob.el either the computed result, or nil, when
they have written results to file themselves. This is in place of the
previous method of returning the output file name as a string to
ob.el.
* lisp/ob-asymptote.el (org-babel-execute:asymptote): Return nil to
signal that the intended content has been written to file.
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Return nil to signal
that the intended content has been written to file.
* lisp/ob-dot.el (org-babel-execute:dot): Return nil to signal that
the intended content has been written to file.
* lisp/ob-gnuplot.el (org-babel-execute:gnuplot): Return nil to signal
that the intended content has been written to file.
* lisp/ob-latex.el (org-babel-execute:latex): Return nil to signal
that the intended content has been written to file.
* lisp/ob-mscgen.el (org-babel-execute:mscgen): Return nil to
signal that the intended content has been written to file.
* lisp/ob-octave.el (org-babel-execute:octave): Return result; not
name of output file.
* lisp/ob-plantuml.el (org-babel-execute:plantuml): Return nil to
signal that the intended content has been written to file.
* lisp/ob-python.el (org-babel-execute:python): Return result; not
name of output file.
* lisp/ob-ruby.el (org-babel-execute:ruby): Return result; not
name of output file.
* lisp/ob-sass.el (org-babel-execute:sass): Return nil if result has
been written to file
":results graphics" is now required in addition to ":file filename" in
order for graphical output to be sent automatically to file. If :file
is supplied, but not ":results graphics", then the default behavior
obtains: i.e., either "value" or "output" results are written to file,
depending on which of those options is in effect.
* lisp/ob-R.el (org-babel-R-graphical-output-file): New function
returns the name of the output file iff R has been instructed to send
graphical output to file by means of the ":results graphics"
directive.
(org-babel-expand-body:R): Use `org-babel-R-graphical-output-file'
when constructing the R code to evaluate, which may be augmented with
code implementing the writing of graohical output to file.
(org-babel-execute:R): Use `org-babel-R-graphical-output-file' to
determine whether R is taking responsibility for writing output to
file; if so, this is signalled to ob.el by returning a nil result.
* lisp/ob.el (org-babel-format-result): New function to format results
of src block execution.
(org-babel-execute-src-block): Use `org-babel-format-result' when
writing to file.
(org-babel-open-src-block-result): Use `org-babel-format-result' when
displaying results in a buffer; name results buffer differently.
* lisp/org-inlinetask.el (org-inlinetask-in-task-p): small
refactoring, do not modify match data either.
(org-inlinetask-goto-end): small refactoring, remove case-sensitivity.
(org-inlinetask-goto-beginning): small refactoring, remove case-sensitivity.
* lisp/org.el (org-before-first-heading-p): If point is on an org-mode heading line then we are not before the first heading
If point is anywhere on the first line of the first heading then we
are not before the first heading. This makes
org-before-first-heading-p returns t instead of nil when on the '*' or
blank of the first level 1 heading in an org file.
This was noticed when the first heading has an encryption
tag :crypt:. C-c C-r would not decrypt this entry if point is at the
beginning of the line since it was considered before the first
heading.
* lisp/org-timer.el (org-timer-continue-hook): Define the variable
(org-timer-pause-or-continue): Run hook after relative timer is
continued
There was a hook run when the relative timer is paused (and for most
other actions), but none for continuing afterwards.
One use for this would be to pause/continue playback in a media-player
app with the same keystroke used to pause/continue the timer.
TINYCHANGE
Patch by Christian Moe
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.
* lisp/org-latex.el (org-export-latex-preprocess): Don't convert link
description parts that look like numeric footnote.
Fixes a problem reported by Thomas S. Dye.
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.
* org-capture.el (org-capture-fill-template): Use `org-set-property'
directly.
* org.el (org-set-property): Split property and values reading.
(org-read-property-name, org-read-property-value)
(org-set-property-function): New functions.
(org-property-set-functions-alist): New variable.
The goal of this patch is to introduce a special variable
`org-property-set-functions-alist'. This variable allows to read
properties values in a more intelligent way from `org-set-property' or
from `org-capture'.
For that, it simplifies the `org-set-property' code and remove
duplication between `org-capture' and `org-set-property'.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org.el (org-make-target-link-regexp): regexp-quote target
before replacing whitespace.
Previously a radio link <<<...>>> would match all three-letter words
in the buffer. The manual indicates the radio links are meant to
match literally (modulo whitespace differences), so we should
regexp-quote all the targets to avoid over-eager matching.
* lisp/org-latex.el (org-export-latex-first-lines): Anchor outline
regexp during LaTeX tree export
Jrg Hagmann writes:
> - If you export the (new) minimal example below to latex (C-cC-e l), it works.
> - If you only export a tree (Subtree in the example; C-cC-e 1 l), the first table ends at the horizontal line and everything between it and the next node (Subsubtree) is eliminated. The second (identical) table is exported correctly.
> - If you remove the asterisk(s) in the first table, it works.
>
> This problem crept in in the last days or weeks before 7.4.
>
> It may not be a problem for most of you, but I happen to have a number of files where columns are automatically displayed as tables preceding the first subnode (#+BEGIN: columnview ...). An alternative would be to display %ITEM in column-view without the asterisks.
>
> Emacs 23.2.1 on OS X 10.6.5
> Org-mode version 7.4 (release_7.4.24.g48b11.dirty)
>
> Thanks, Jrg
>
> -------New minimal example------------
> * Subtree
>
>
> | One | Two | Three |
> |--------+------+-------|
> | * Test | text | text |
> | ** One | text | text |
>
>
> Some text
>
> ** Subsubtree
>
> | One | Two | Three |
> |--------+------+-------|
> | * Test | text | text |
> | ** One | text | text |