* lisp/ob-tangle.el (org-babel-spec-to-string): Adding "noweb" as a
linking comment type
(org-babel-tangle-comment-links): Returns comment links for the
source code block at point
* lisp/ob.el (org-babel-expand-noweb-references): When :comments is
set to "noweb" then wrap noweb references in comment links.
Thanks to Leo Alekseyev for bringing this bug to my attention
* lisp/ob.el (org-babel-open-src-block-result): Must collect result
*before* jumping to the result buffer.
* lisp/ob.el (org-babel-temp-file): Ensure that
org-babel-temporary-directory is bound before using.
(org-babel-remove-temporary-directory): Safer error throwing.
* lisp/ob.el (org-babel-script-escape): Replace commas with spaces for
better list reading when list items are packed with commas,
e.g. Haskell list output.
Thanks to Vladimir Alexiev for submitting this patch
* lisp/ob.el (org-babel-confirm-evaluate): Fix for the case when
org-confirm-babel-evaluate is a function (used to always ask no matter
what the function returns).
* doc/org.texi (Code evaluation security): Add example for using a
function.
* 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.
* org.el: remove spurious linebreak introduced by earlier patch
* ob.el, ob-ref.el: remove double fix of the same problem
Achim Gratz <Stromeko@Stromeko.DE> wrote:
> this patch had already been partially applied by Carsten and Eric (in
> slightly a different way than I suggested). The changes to ob.el and
> ob-ref.el (the require statements) are therefore superfluous and should
> probably be backed out. There was also a superfluous whitespace change
> in org.el (a closing paren that was broken onto the next line). Patch
> to this effect is attached. You've already cleaned up org-agenda.el and
> the conditions in org-macs...
* lisp/ob.el (org-babel-remove-temporary-directory): Handle exception
with message informing of failure to remove directory.
Thanks to Antti Kaihola for the bug report:
http://thread.gmane.org/gmane.emacs.orgmode/34394
From: Antti Kaihola <akaihola <at> gmail.com>
Subject: Can't close Emacs+org-mode if /tmp and /home on different partitions
Newsgroups: gmane.emacs.orgmode
Date: 2010-12-02 08:33:28 GMT (6 days, 1 hour and 22 minutes ago)
I have /tmp on my root partition and a separate partition for /home.
When trying to close an Emacs session which is using org-mode, I get
this error:
move-file-to-trash: Non-regular file: Is a directory, /tmp/babel-XXXXXXX
(where XXXXXXX are random characters).
I tracked down the problem to org-babel-remove-temporary-directory
which ob.el adds to kill-emacs-hook. It tries to remove the temporary
directory using delete-directory, which in turn tries to move the
directory (by renaming) into trash, which is in my home directory.
I added this to my ~/.emacs.d/init.el:
(custom-set-variables '(temporary-file-directory "/home/akaihola/tmp/"))
and closing Emacs works correctly again. However, since my init.el is
part of emacs-starter-kit which I update frequently, I'd prefer not to
modify that file. Unfortunately the customization hook
emacs-starter-kit provides (~/.emacs.d/custom.el) is loaded too late
to affect the temporary directory.
I'm running emacs-snapshot 1:20090909-1 in Ubuntu 10.10. Looks like
this is really an Emacs bug and is already fixed:
http://groups.google.com/group/gnu.emacs.bug/browse_thread/thread/0446b8684a8ef504
* lisp/ob.el (org-babel-insert-result): Responds to new "wrap" header
argument.
(org-babel-merge-params): Includes new "wrap" header argument in
one of the results header argument exclusive groups.
* lisp/org.el (org-additional-option-like-keywords): Fontify begin and
and results lines as comments.
Thanks to Charles C. Berry for insisting on this issues existence
This change is now secured with a unit test
* lisp/ob.el (org-babel-parse-header-arguments): Stripping trailing
spaces off of header arguments (even the first one).
* lisp/ob-eval.el (org-babel-error-buffer-name): Define new variable.
(org-babel-eval-error-notify): Use new variable `org-babel-error-buffer-name'
(org-babel-eval): Make temp error buffer invisible to the user with
initial space in name.
(org-babel-eval-wipe-error-buffer): New function to wipe the error message buffer.
* lisp/ob-exp.el (org-babel-eval-wipe-error-buffer): Declare external function
`org-babel-eval-wipe-error-buffer'.
(org-babel-exp-results): Wipe error buffer clean at outset of execution
* lisp/ob.el (org-babel-execute-src-block-maybe): Wipe error buffer clean at
outset of execution
(org-babel-eval-wipe-error-buffer): Declare external function
`org-babel-eval-wipe-error-buffer'.
* lisp/ob-python.el (org-babel-python-table-or-string): Using
`org-babel-script-escape' for reading string input from scripting
languages.
* lisp/ob-ruby.el (org-babel-ruby-table-or-string): Using
`org-babel-script-escape' for reading string input from scripting
languages.
* lisp/ob.el (org-babel-script-escape): Using
`org-babel-script-escape' for reading string input from scripting
languages.
* lisp/ob-haskell.el (org-babel-haskell-table-or-string): Using
`org-babel-script-escape' for reading string input from scripting
languages.
Thanks to Nicolas Goaziou for pointing this out
* lisp/ob-ref.el (org-babel-ref-at-ref-p): Use higher level function
for testing list membership.
* lisp/ob.el (org-babel-read-result): Use higher level function for
testing list membership.
(org-babel-result-end): Use higher level function for testing list
membership.
* lisp/ob-ref.el (org-babel-ref-resolve): Recognize `list' as a unique
type of data
(org-babel-ref-at-ref-p): Recognize `list' as a unique type of data
* lisp/ob.el (org-babel-read-result): Recognize `list' as a unique
type of data
(org-babel-read-list): A function to read a textual Org-mode list
into an emacs-lisp list.
(org-babel-insert-result): Recognizes the "list" result param to
insert data as an Org-mode list.
(org-babel-result-end): Find the end of an Org-mode list.
(org-babel-merge-params): Add "list" as a result param.
* doc/org.texi (results): Documentation of the new "list" results
header argument.
* lisp/ob-lob.el (org-babel-lob-get-info): including pass-through
header arguments in results variable header argument string
* lisp/ob.el (org-babel-execute-src-block): working with new header
argument setup
(org-babel-parse-header-arguments): only split header argument
strings when []'s are balanced
* lisp/ob.el (org-babel-execute-src-block): If ":results file" is in
effect, then ensure that the value of :file is returned as the result;
don't rely on language files for this.
Examples of languages that were not honouring :file are sh and
emacs-lisp.