From: "Eric Schulte" <schulte.eric@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [Babel] [Ann] varied updates and improvements
Date: Thu, 21 Oct 2010 08:18:19 -0600 [thread overview]
Message-ID: <87lj5r1vf8.fsf@gmail.com> (raw)
Hello Babblers,
I've just merged in a large group of changes to Babel (authored by Dan
and myself) including a couple of user-visible enhancements and a
significant cleanup of the code base. More information is available in
the Changes.org file (relevant sections included below).
Best -- Eric
Incompatible Changes
=====================
Code block hashes
------------------
Due to changes in the code resolving code block header arguments
hashing of code block results should now re-run a code block when
an argument to the code block has changed. As a result of this
change *all* code blocks with cached results will be re-run after
upgrading to the latest version.
Testing update
---------------
Anyone using the org-mode test suite will need to update the jump
repository for test navigation by executing the following from
the root of the org-mode repository.
git submodule update
Failure to update this repository will cause loading of
org-test.el to throw errors.
Details
========
Multi-line header arguments to code blocks
-------------------------------------------
Code block header arguments can now span multiple lines using the
new =#+header:= or =#+headers:= lines preceding a code block or
nested in between the name and body of a named code block.
Examples are given below.
- multi-line header arguments on an un-named code block
#+headers: :var data1=1
#+begin_src emacs-lisp :var data2=2
(message "data1:%S, data2:%S" data1 data2)
#+end_src
#+results:
: data1:1, data2:2
- multi-line header arguments on a named code block
#+source: named-block
#+header: :var data=2
#+begin_src emacs-lisp
(message "data:%S" data)
#+end_src
#+results: named-block
: data:2
Unified handling of variable expansion for code blocks
-------------------------------------------------------
The code used to resolve variable references in code block header
arguments has now been consolidated. This both simplifies the
code base (especially the language-specific files), and ensures
that the arguments to a code block will not be evaluated multiple
times. This change should not be externally visible to the
Org-mode user.
Improved Caching
-----------------
Code block caches now notice if the value of a variable argument
to the code block has changed, if this is the case the cache is
invalidated and the code block is re-run. The following example
can provide intuition for the new behavior.
#+srcname: random
#+begin_src R :cache yes
runif(1)
#+end_src
#+results[a2a72cd647ad44515fab62e144796432793d68e1]: random
0.4659510825295
#+srcname: caller
#+begin_src emacs-lisp :var x=random :cache yes
x
#+end_src
#+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller
0.254227238707244
next reply other threads:[~2010-10-21 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 14:18 Eric Schulte [this message]
2011-01-01 20:41 ` [Babel] [Ann] varied updates and improvements Thomas S. Dye
2011-01-01 21:09 ` Thomas S. Dye
2011-01-01 21:01 ` Thomas S. Dye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lj5r1vf8.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.