* ob.el (org-babel-named-src-block-regexp-for-name): Generate
a more general regexp.
Thanks to Loris Bennett for reporting this, and to Nicolas Girard for
pointing out what was the problem precisely.
* lisp/ob.el (org-babel-expand-noweb-references): Capture current
noweb start and end patterns then use to set buffer locals in
(with-temp-buffer) form.
This solves the problem that using different patterns for
org-babel-noweb-wrap-start and org-babel-noweb-wrap-end could be done
only globally.
TINYCHANGE
* lisp/ob.el (org-babel-string-read): Don't automatically evaluate
code block results which look like elisp.
(org-babel-import-elisp-from-file): Raise a warning message when the
process of reading code block results raises an error.
* lisp/ob.el (org-babel-exeext): New defconst to hold extension for
executables or nil if none. Should be ".exe" for both Windows and
Cygwin.
* lisp/ob-C.el (org-babel-C-execute): Use org-babel-exeext when
constructing the target file name for the compiled executable.
* lisp/ob-fortran.el (org-babel-execute:fortran): Add org-babel-exeext
when constructing the target file name for the compiled executable.
This patch ensure Org-mode will build on all supported versions of
Emacs, after the renaming of the cl macros behind the cl- prefix in the
recent Emacs trunk.
* lisp/org-compat.el (org-flet): Compatibility function now that flet
has been removed from cl-macs.
(org-labels): Compatibility function now that labels has been removed
from cl-macs.
* lisp/ob-R.el (org-compat): Require org-compat.
* lisp/ob-comint.el: Require org-compat.
* lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility
function.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to
compatibility function.
* lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility
function.
(org-babel-lob-execute): Switch to compatibility function.
* lisp/ob-python.el (org-babel-python-evaluate-session): Switch to
compatibility function.
* lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility
function.
* lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility
function.
* lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility
function.
(org-babel-tangle): Switch to compatibility function.
(org-babel-spec-to-string): Switch to compatibility function.
* lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility
function.
(org-babel-execute-src-block): Switch to compatibility function.
(org-babel-edit-distance): Switch to compatibility function.
(org-babel-switch-to-session-with-code): Switch to compatibility
function.
(org-babel-sha1-hash): Switch to compatibility function.
(org-babel-balanced-split): Switch to compatibility function.
(org-babel-join-splits-near-ch): Switch to compatibility function.
(org-babel-get-rownames): Switch to compatibility function.
(org-babel-format-result): Switch to compatibility function.
(org-babel-insert-result): Switch to compatibility function.
(org-babel-examplize-region): Switch to compatibility function.
(org-babel-merge-params): Switch to compatibility function.
(org-babel-noweb-p): Switch to compatibility function.
(org-babel-expand-noweb-references): Switch to compatibility function.
* lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility
function.
(org-bibtex-fleshout): Switch to compatibility function.
(org-bibtex-read): Switch to compatibility function.
(org-bibtex-write): Switch to compatibility function.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to
compatibility function.
* lisp/org-exp.el (org-export-format-source-code-or-example): Switch to
compatibility function.
* lisp/org-macs.el (org-called-interactively-p): Indentation fix.
* lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility
function.
(org-mouse-set-priority): Switch to compatibility function.
(org-mouse-popup-global-menu): Switch to compatibility function.
(org-mouse-context-menu): Switch to compatibility function.
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to
compatibility function.
(org-plot/gnuplot-script): Switch to compatibility function.
* lisp/org.el (org-entry-get): Switch to compatibility function.
(org-fill-paragraph): Switch to compatibility function.
(org-auto-fill-function): Switch to compatibility function.
* lisp/ob.el (org-babel-set-current-result-hash): Change the hash of the
results for the current code block.
(org-babel-current-result-hash): Fix documentation.
* lisp/ob-lob.el (org-babel-lob-execute): Don't re-execute the called
function if the current call line hash matches that in its results.
* lisp/ob.el (org-babel-capitalize-examplize-region-markers): Controls
the capitalization of begin and end example blocks.
(org-babel-examplize-region): Optionally capitalize example block
delimiters.
This will no longer insert the value of the :file header argument as
the description if the description is left blank (as this changes
the meaning of the :file header argument).
The desc handling logic is moved to the `org-babel-result-to-file'
function.
* lisp/ob.el (org-babel-result-to-file): New optional description
argument.
(org-babel-insert-result): Moved description logic to another
function.
* lisp/ob.el (org-babel-insert-result): Change name of filelinkdescr
to file-desc.
(org-babel-common-header-args-w-values): Change name of
filelinkdescr to file-desc.
* lisp/ob-exp.el (org-babel-exp-code): Escape all lines when exporting
Org-mode blocks.
* lisp/ob.el (org-babel-parse-src-block-match): Make use of the new
language argument to org-babel-strip-protective-commas.
(org-babel-parse-inline-src-block-match): Make use of the new
language argument to org-babel-strip-protective-commas.
(org-babel-strip-protective-commas): Now accepts a language
argument.
Conflicts:
lisp/ob-exp.el
* lisp/ob-exp.el (org-babel-exp-code): Escape all lines when exporting
Org-mode blocks.
* lisp/ob.el (org-babel-parse-src-block-match): Make use of the new
language argument to org-babel-strip-protective-commas.
(org-babel-parse-inline-src-block-match): Make use of the new
language argument to org-babel-strip-protective-commas.
(org-babel-strip-protective-commas): Now accepts a language
argument.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.
This commit also bumps the version number to 7.8.06.
The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
* lisp/ob.el (org-babel-merge-params): Add "eval" as acceptable noweb
argument.
(org-babel-noweb-p): The "eval" argument only expands during
evaluation.
* lisp/ob-tangle.el (org-babel-tangle): Don't prompt for a file name
if :tangle is specified.
* lisp/ob.el (org-babel-expand-noweb-references): Widen buffer when
expanding noweb references.
> attached is a patch that enhances org-babel-goto-named-src-block (bound
> to C-c C-v g by default). Included are two enhancements:
>
> 1. the point is pushed to the org-mark-ring, such that returning with
> C-c & becomes possible
> 2. the target src block is guessed from
> a) noweb-reference
> b) #+call:
> c) #+results:
> d) symbol-at-point
> if one of these is found (in that order)
* lisp/ob.el (org-babel-goto-named-src-block): Pushing the point to
the org-mark-ring and guessing at the code block name to jump to.
* 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.
Conflicts:
testing/lisp/test-ob.el
* 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.