* ob.el (org-babel-mark-block): New function to mark the body
of a src block in the style of `mark-defun'.
* ob-keys.el (org-babel-key-bindings): Bind
`org-babel-mark-block' to C-c C-v C-M-h
* lisp/org-compat.el (org-number-sequence): New function.
* lisp/ob-R.el (org-babel-expand-body:R): Use `org-number-sequence'.
* lisp/ob.el (org-babel-where-is-src-block-result): Use `org-number-sequence'.
(org-babel-current-buffer-properties): Fix variable definition.
* lisp/ob-ref.el (org-babel-ref-index-list): Use `org-number-sequence'.
* lisp/ob-latex.el (org-babel-latex-tex-to-pdf): Use the 2-argument version
of `shell-command'.
* lisp/org-latex.el (org-export-as-pdf): Use the 2-argument version
of `shell-command'.
Thanks to Achim Gratz
* lisp/ob.el (or): don't create org-babel-temporary-directory in batch
as it won't be removed by emacs-kill-hook
(org-babel-remove-temporary-directory): only try to remove this
directory if it exists
We had stopped using this because users noticed that temporary
directories were accumulating in their /tmp directory. I believe this
was due to repeatedly evaluating the ob.el emacs-lisp file, which
repeatedly re-defined the `org-babel-temporary-directory' variable
creating multiple directories. This problem should be fixed by
wrapping the defvar holding this form in (unless (boundp org...)).
* lisp/ob.el (boundp): uncommenting defvar form for
org-babel-temporary-directory
(org-babel-temp-file): now using the org-babel-temporary-directory
for holding new babel temporary files
(org-babel-remove-temporary-directory): removes the babel temp dir
when Emacs shutsdown
(kill-emacs-hook): now removing the babel temp dir on Emacs shutdown
* ob.el (org-babel-process-file-name): New function
(org-babel-maybe-remote-file): Delete function
* ob-sql.el (org-babel-execute:sql):
Use org-babel-process-file-name
* ob-scheme.el (org-babel-execute:scheme):
Use org-babel-process-file-name
* ob-sass.el (org-babel-execute:sass):
Use org-babel-process-file-name
* ob-ruby.el (org-babel-ruby-evaluate):
Use org-babel-process-file-name
* ob-python.el (org-babel-python-evaluate-external-process):
Use org-babel-process-file-name
(org-babel-python-evaluate-session):
Use org-babel-process-file-name
* ob-plantuml.el (org-babel-execute:plantuml):
Use org-babel-process-file-name
* ob-perl.el (org-babel-perl-evaluate):
Use org-babel-process-file-name
* ob-octave.el (org-babel-octave-evaluate-external-process):
Use org-babel-process-file-name
(org-babel-octave-evaluate-session):
Use org-babel-process-file-name,
don't use org-babel-maybe-remote-file
* ob-lisp.el (org-babel-execute:lisp):
Use org-babel-process-file-name
* ob-ledger.el (org-babel-execute:ledger):
Use org-babel-process-file-name
* ob-js.el (org-babel-execute:js):
Use org-babel-process-file-name
* ob-haskell.el (org-babel-haskell-export-to-lhs):
Use org-babel-process-file-name
* ob-gnuplot.el (org-babel-execute:gnuplot):
Use org-babel-process-file-name
* ob-eval.el (org-babel-eval-read-file): Don't use
org-babel-maybe-remote-file
* ob-dot.el (org-babel-execute:dot):
Use org-babel-process-file-name
* ob-ditaa.el (org-babel-execute:ditaa):
Use org-babel-process-file-name
* ob-clojure.el (org-babel-clojure-evaluate-external-process):
Use org-babel-process-file-name
* ob-asymptote.el (org-babel-execute:asymptote):
Use org-babel-process-file-name
* ob-R.el (org-babel-R-assign-elisp): Don't use
org-babel-maybe-remote-file, use org-babel-process-file-name
(org-babel-R-evaluate-external-process):
Use org-babel-process-file-name
(org-babel-R-evaluate-session):
Use org-babel-process-file-name
* ob-C.el (org-babel-C-execute):
Use org-babel-process-file-name
In addition to passing the file path through `expand-file-name',
tramp-style remote file names are converted to conventional (local)
file paths. The reason is that, if a tramp file name was in use in
emacs, then the shell command will be executing on the remote machine
in question. Further, by default the file name is passed through
`shell-quote-argument'.
Thanks to Richard Riley for the initial idea and implementation
* lisp/ob.el (org-babel-demarcate-block): interactive demarcation of
code blocks
* lisp/ob-keys.el (org-babel-key-bindings): key bindings for block
demarcation
* doc/orgcard.tex: documentation in the ref card
* lisp/ob-keys.el (org-babel-key-bindings): adding key-binding for
`org-babel-goto-src-block-head'
* lisp/ob.el (org-babel-goto-src-block-head): jump to the head of the
current code block
* lisp/ob.el (org-babel-next-src-block): now raising more informative
error when no further code blocks can be found
(org-babel-previous-src-block): now raising more informative error
when no previous code blocks can be found
Thanks to Sébastien Vauban for making the case for this behavior
* lisp/ob.el (org-babel-insert-result): remove existing results when
nil results are returned
* ob.el (org-babel-temp-file): Don't use babel temporary
directory in remote case; use make-temp-file with remote file
name so that temp file is guaranteed not to exist previously
on remote machine.
(org-babel-tramp-localname): New function to return local name
portion of possibly remote file specification
* ob-R.el (org-babel-R-evaluate-external-process): Respond to
changes in `org-babel-temp-file'; pass local file name to
remote R process.
(org-babel-R-evaluate-session) Respond to
changes in `org-babel-temp-file'; pass local file name to
remote R process.
this makes it possible to export while not evaluating some code
blocks
* lisp/ob-exp.el (org-babel-exp-do-export): removing hacky ":noeval",
which is now an alias to ":eval no"
* lisp/ob.el (org-babel-confirm-evaluate): ":noeval" is an alias for
":eval no", also no longer throwing errors
(org-babel-header-arg-names): adding both eval and noeval as general
header arguments
(org-babel-execute-src-block): now using the new non-error
confirmation functionality
ob-org has two non-standard header arguments in that it exports it's
results by default and the result type defaults to raw, this ensures
that the body of a begin_src org block exports transparently.
This is a breaking change in that if you are currently using org
code blocks to export org-fontified code you will have to set the
":exports" header argument for org-mode blocks to "code" on a block,
file, language or system-wide basis.
* Makefile (LISPF): adding ob-org.el to the makefile
* lisp/ob-org.el: defines handling of org code blocks
* lisp/ob.el (org-babel-insert-result): now when "org" is a result
type the results are wrapped in an org code block