* doc/org.texi (eval): Documentation of the new :eval option.
* lisp/ob.el (org-babel-confirm-evaluate): Inhibit evaluation during
export when eval is set to "non-export".
* lisp/ob-ref.el (org-babel-update-intermediate): New custom variable.
(org-babel-ref-resolve): Optionally update the in-buffer results of
code blocks which are evaluated to resolve references.
* lisp/ob.el (org-babel-join-splits-near-ch): Rejoins a list of a
split string when a character appears on either side of the split.
(org-babel-parse-multiple-vars): Rejoin splits around "=" signs.
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't limit
in-verbatim check to inline code blocks, do lob code blocks as well.
* testing/lisp/test-ob-lob.el (test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export):
Test ensuring that #+call lines in verbatim blocks are not evaluated
* contrib/lisp/org-odt.el (org-export-odt-max-image-size): New
variable.
(org-odt-image-size-from-file): Honor above variable.
Ivars Finvers <ifinvers@shaw.ca> says -
One minor issue that I came across in using the ODT
exporter relates to the size of embedded images. I often need
to include plots of simulation results in my documents. These
plots can be larger than a normal page, which causes problems
in the text flow. In LaTeX, I've grown used to being able to
automatically rescale a plot to match the maximum text width
of the document. It would be useful to have such a feature
for the ODT exporter.
* lisp/org.el (org-todo): Interpret 0 prefix arg as note inhibitor.
Sometimes I want to quickly make a few TODOs done in the agenda and I
want to bypass the note taking I have normally set up. With this
change, I can press `0 t d' in the agenda to do this.
* lisp/ob.el (org-babel-named-src-block-regexp-for-name): Ensure that
partial names are not matched.
(org-babel-named-data-regexp-for-name): Ensure that partial names
are not matched.
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
Test to ensure that partial names are not matched.
* lisp/ob-ref.el (org-babel-ref-resolve): Search for named code blocks
before named data.
* lisp/ob.el (org-babel-named-data-regexp-for-name): New function for
finding named data.
* testing/lisp/test-ob.el (test-ob/resolve-code-blocks-before-data-blocks):
Test to ensure that named references are resolved in the correct
order.
* lisp/ob-ref.el (org-babel-ref-resolve): Don't change location when
looking at the contents.
* testing/lisp/test-ob.el (test-ob/catches-all-references): Test
enforcing the correct behavior.
* org.el (org-set-outline-overlay-data): Use outline-flag-region to make a
region invisible. This ensures all necessary actions, especially adding
isearch-open-invisible property, are applied.
* lisp/ob.el (org-babel-find-named-result): Downcase "name" before comparison.
* testing/lisp/test-ob.el (test-ob/does-not-replace-a-block-with-the-results):
Test that named code blocks are replaced with their results.
* testing/lisp/test-ob-R.el (featurep): Signal missing dependencies
with an error rather than a throw.
* testing/org-test.el (missing-test-dependency): Define the error
signal for missing dependencies.
(org-test-for-executable): Signal missing dependencies with an error
rather than a throw.
(org-test-load): Define an expected failing test for each file with
missing dependencies.
* testing/lisp/test-ob.el (test-org-babel/nested-code-block):
Evaluation of a nested block.
(test-org-babel/partial-nested-code-block): Evaluation of a
partially nested block.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Some valid
execution contexts (e.g., call lines) look like commented lines.
* lisp/ob.el (org-babel-get-src-block-info): Empty match string
doesn't count.
(org-babel-process-params): Always process parameters, even if you
don't to table splitting.
* testing/lisp/test-ob-C.el (ob-C/table): Ignore failures for this C
test.
* testing/lisp/test-ob-fortran.el (ob-fortran/input-var): Ignore
failures for this fortran test.
This results in the following behavior.
#+property: var foo=1
#+property: var+ bar=2
#+begin_src emacs-lisp
(+ foo bar)
#+end_src
#+results:
: 3
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=1 bar=2
* overwriting a file-wide property
:PROPERTIES:
:var: foo=7
:END:
#+begin_src emacs-lisp
foo
#+end_src
#+results:
: 7
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=7
* appending to a file-wide property
:PROPERTIES:
:var+: baz=3
:END:
#+begin_src emacs-lisp
(+ foo bar baz)
#+end_src
#+results:
: 6
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=1 bar=2 baz=3
* lisp/org.el (org-update-property-plist): Updates a given property
list with a property name and a property value.
(org-set-regexps-and-options): Use org-update-property-plist.
(org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
characters as well as groups of two characters.
(org-babel-parse-multiple-vars): Split variables on single spaces.
Nick Dokos <nicholas.dokos@hp.com> writes:
> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----
The attached version fixes these issues, Thanks -- Eric
>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE
Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.
- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
block may still be labeled with #+results:, and tables named with
#+tblname: will be considered to be named results
The following function may be used to update an existing Org-mode
buffer to the new syntax.
(defun update-org-buffer ()
"Update an Org-mode buffer to the new data, code block and call line syntax."
(interactive)
(save-excursion
(flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
"\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
(update (re new)
(goto-char (point-min))
(while (re-search-forward re nil t)
(replace-match new nil nil nil 1))))
(let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
(lob-re (to-re '("LOB")))
(case-fold-search t))
(update old-re "name")
(update lob-re "call")))))
Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
is installed on your system many of the important variables will
be pre-defined with a defvar and *will not* have their values
automatically updated, these include the following.
- org-babel-data-names
- org-babel-result-regexp
- org-babel-src-block-regexp
- org-babel-src-name-regexp
- org-babel-src-name-w-name-regexp
It may be necessary to either remove the source code of older
versions of Org-mode, or to explicitly evaluate the ob.el file.
* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
regular expression.
(org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
(org-babel-get-src-block-info): Updated match strings.
(org-babel-data-names): Simplified acceptable names.
(org-babel-find-named-block): Indentation.
(org-babel-find-named-result): Updated to not return a code block as
a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
references to old syntactic elements.
(org-additional-option-like-keywords): Removing references to old
syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
literal values of old regular expressions rather than their
behavior.
* lisp/org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX
environment when at an item or an headline, but allow LaTeX
fragments.
(org-cycle): Try to call `cdlatex-tab' before cycling item's or
headline's visibility, in order to catch LaTeX fragments within.
This patch is based on the report and work of Maik Beckmann.