* lisp/ob.el (org-babel-strip-protective-commas): Use
`org-strip-protective-commas'.
* lisp/org-exp.el (org-export-select-backend-specific-text): Use
`org-strip-protective-commas'.
* lisp/org-src.el (org-edit-src-code): Use
`org-strip-protective-commas'.
* lisp/org.el (org-strip-protective-commas): Single definition for
this functionality.
This makes it easier to keep consistent behavior.
* lisp/ob-tangle.el (org-babel-tangle-clean): Just use default value.
* lisp/ob.el (org-babel-noweb-wrap): Add default value.
(org-babel-expand-noweb-references): Just use default value.
Thanks to Sean O'Halpin for suggesting this change.
* lisp/ob-tangle.el (org-babel-tangle-clean): Use the customizable
noweb wrappers.
* lisp/ob.el (org-babel-noweb-wrap-start): Begin a noweb reference.
(org-babel-noweb-wrap-end): End a noweb reference.
(org-babel-noweb-wrap): Apply the customizable noweb wrappers.
(org-babel-expand-noweb-references): Use the customizable noweb
wrappers.
* lisp/ob.el:
Fix `org-babel-result-end' command to provide consistent result
removal where result is type `wrap'. Prior to this fix
multiple (org-ctrl-c-ctrl-c) commands will add multiple newlines to
the end of results (one newline per block execution).
This fixes the test `test-ob/org-babel-remove-result--results-wrap'
* testing/lisp/test-ob.el:
Uncomment test since it now passes.
* lisp/ob.el (org-babel-expand-noweb-references): Only allow
reference names which start and end with non-whitespace characters.
Also, raise errors as appropriate given org-babel-noweb-error-langs.
* doc/org.texi (noweb-sep): Document new header argument.
* lisp/ob.el (org-babel-common-header-args-w-values): Add new header
argument.
(org-babel-expand-noweb-references): Use header argument rather than
customization variable.
* lisp/ob.el (org-babel-noweb-separator): Custom variable for
accumulated noweb references.
(org-babel-expand-noweb-references): Allow separator for noweb
references.
* doc/org.texi (noweb-ref): Documentation of this new custom variable.
* lisp/ob.el (org-babel-map-src-blocks): Don't pollute symbol space.
(org-babel-map-inline-src-blocks): Don't pollute symbol space.
(org-babel-map-call-lines): Don't pollute symbol space.
(org-babel-map-executables): Map over *all* executable Org-mode
elements.
(org-babel-execute-buffer): Execute elements in buffer order instead
of arbitrarily.
* lisp/ob.el (org-babel-results-keyword): New user-configurable
results keyword.
(org-babel-where-is-src-block-result): Use new user-configurable
results keyword.
* lisp/ob-exp.el (org-babel-exp-src-block): Use `org-babel-noweb-p'.
(org-babel-exp-inline-src-blocks): Use `org-babel-noweb-p'.
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Use
`org-babel-noweb-p'.
* lisp/ob.el (org-babel-execute-src-block): Use `org-babel-noweb-p'.
(org-babel-expand-src-block): Use `org-babel-noweb-p'.
(org-babel-load-in-session): Use `org-babel-noweb-p'.
(org-babel-merge-params): Use `org-babel-noweb-p'.
(org-babel-noweb-p): New function used to determine if noweb
expansion should be carried out in a given context.
* lisp/ob.el (org-babel-common-header-args-w-values): Add the new
header argument name.
(org-babel-insert-result): Respect the value of the :wrap header
argument when inserting results.
(org-babel-result-end): Find the end of arbitrarily named result
blocks.
Thanks to Martyn Jago for the test case
* lisp/ob.el (org-babel-balanced-split): Explicit checking if list
before calling member.
* testing/lisp/test-ob.el (test-ob/org-babel-balanced-split): Testing
the new Emacs22-proof behavior.
Thanks to Martyn Jago for the test case
* lisp/ob.el (org-babel-balanced-split): Explicit checking if list
before calling member.
* testing/lisp/test-ob.el (test-ob/org-babel-balanced-split): Testing
the new Emacs22-proof behavior.
* lisp/ob.el (org-babel-expand-noweb-references): Rather than using a
pure regexp solution to resolve noweb references, actually check the
information of every code block in the buffer. This will cause a
slowdown in noweb reference expansion, but is necessary for correct
behavior.
* lisp/ob.el (*org-babel-use-quick-and-dirty-noweb-expansion*):
Controls the method in which noweb references are expanded.
(org-babel-expand-noweb-references): Bring back the option for
regexp-based noweb expansion.
* lisp/ob.el (org-babel-expand-noweb-references): Rather than using a
pure regexp solution to resolve noweb references, actually check the
information of every code block in the buffer. This will cause a
slowdown in noweb reference expansion, but is necessary for correct
behavior.
* org.el (org-block-regexp)
(org-heading-keyword-regexp-format)
(org-heading-keyword-maybe-regexp-format): Move up to keep the
byte-compiler happy.
* org-special-blocks.el (org-html): Require 'org-html.
(org-open-par, org-close-par-maybe): Declare as functions.
* ob.el (org-reduce): Declare as a function.
(org-current-export-file): Declare.
* ob-ref.el (org-babel-update-intermediate): Make a defvar.
* lisp/ob.el (org-babel-expand-noweb-references): Fixed regexp.
* testing/lisp/test-ob.el (test-ob/noweb-expansion): Test both named
code block and noweb-ref header argument references.
Given that arbitrary regions may already be hidden using a drawer the
ability to hide any named entity is redundant. In addition the name
based hiding does not mix well with other keywords.
Thanks to Nicolas Goaziou for raising this issue and suggesting the
removal of #+name based hiding.
* lisp/ob.el (org-babel-expand-noweb-references): Rather than collect
the info from *every* block in the current buffer, simply regexp
search for those blocks which appear to match the continued source
name.