Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

This commit is contained in:
Carsten Dominik 2010-04-05 08:33:34 +02:00
commit 0e530ee795
2 changed files with 22 additions and 25 deletions

View File

@ -514,12 +514,9 @@ around org-babel.
Thanks to Maurizio Vitale for this suggestion.
- Variable references which look like lisp forms are now
evaluated.
- Inline source blocks will always return string output.
- No longer adding extension during tangling when filename is
provided.
Thanks to Martin G. Skjæveland and Nicolas Girard for prompting this.
- Code block parameters are now available when initializing a
session.
- Added `org-babel-execute-hook' which runs after code block
execution.
- Working directories and remote execution
@ -543,7 +540,6 @@ around org-babel.
- org-R removed from contrib.
- gnuplot can now return it's string output -- when session is
set to "none".
- Prevent quoting of strings in shell variables.
- Now including source code block arguments w/source name on
export.
- Now able to reference file links as results.

View File

@ -226,27 +226,28 @@ block."
(if (boundp 'call-process-region-original) call-process-region-original
(symbol-function 'call-process-region)))
result)
;; (message "params=%S" params) ;; debugging
(flet ((call-process-region (&rest args)
(apply 'org-babel-tramp-handle-call-process-region args)))
(unless (member lang org-babel-interpreters)
(error "Language is not in `org-babel-interpreters': %s" lang))
(if (and (not arg) new-hash (equal new-hash old-hash))
(save-excursion ;; return cached result
(goto-char (org-babel-where-is-src-block-result nil info))
(move-end-of-line 1) (forward-char 1)
(setq result (org-babel-read-result))
(message (replace-regexp-in-string "%" "%%" (format "%S" result))) result)
(setq result (funcall cmd body params))
(if (eq result-type 'value)
(setq result (if (and (or (member "vector" result-params)
(member "table" result-params))
(not (listp result)))
(list (list result))
result)))
(org-babel-insert-result result result-params info new-hash)
(run-hooks 'org-babel-after-execute-hook)
result))))
(unwind-protect
(flet ((call-process-region (&rest args)
(apply 'org-babel-tramp-handle-call-process-region args)))
(unless (member lang org-babel-interpreters)
(error "Language is not in `org-babel-interpreters': %s" lang))
(if (and (not arg) new-hash (equal new-hash old-hash))
(save-excursion ;; return cached result
(goto-char (org-babel-where-is-src-block-result nil info))
(move-end-of-line 1) (forward-char 1)
(setq result (org-babel-read-result))
(message (replace-regexp-in-string "%" "%%" (format "%S" result))) result)
(setq result (funcall cmd body params))
(if (eq result-type 'value)
(setq result (if (and (or (member "vector" result-params)
(member "table" result-params))
(not (listp result)))
(list (list result))
result)))
(org-babel-insert-result result result-params info new-hash)
(run-hooks 'org-babel-after-execute-hook)
result))
(setq call-process-region 'call-process-region-original))))
(defun org-babel-load-in-session (&optional arg info)
"Load the body of the current source-code block. Evaluate the