* contrib/lisp/org-element.el (org-element-latex-environment-parser):
Grab value until closing of main environment block.
(org-element-current-element): Check if main block is properly closed.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-map): `org-element-map' now
applies to strings and secondary strings.
* testing/lisp/test-org-element.el: Add tests.
* contrib/lisp/org-element.el (org-element-at-point,
org-element-backward, org-element-up, org-element-down,
org-element-drag-backward): Refactor.
(org-element-swap-A-B): Handle the case of the first paragraph in an
item.
(org-element-transpose): New function.
(org-transpose-elements): Removed function.
(org-element-unindent-buffer): Correctly un-indent contents of
headlines.
* testing/lisp/test-org-element.el: Add tests.
* contrib/lisp/org-element.el (org-element-footnote-definition-parser):
Fix bug when parsing a footnote definition at end of buffer.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-babel-call-parser): Be sure
to match "#+CALL:".
(org-element-block-name-alist): New variable.
(org-element-non-recursive-block-alist): Removed variable.
(org-element-current-element): Refactor.
* testing/lisp/test-org-element.el: Add tests.
* contrib/lisp/org-export.el (org-export-table-row-is-special-p,
org-export-table-cell-width, org-export-table-cell-alignment):
Ensure cell only contains a string before trying to match width
cookie.
* testing/lisp/test-org-export.el: Modify tests accordingly.
Thanks to Eric Fraga for discovering and investigating about this.
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
* contrib/lisp/org-element.el (org-element-export-snippet-parser):
Change syntax from @back-end{contents} to <back-end@contents>.
(org-element-export-snippet-successor): Use new syntax
* testing/lisp/test-org-element.el: Add test.
This change is required as curly braces conflict with LaTeX syntax
when trying to break a command in two parts. On the other hand, HTML
tags can be broken easily in two. More explicitely, both the
following constructs are possible now:
<latex@\textsc{>Name<latex@}> and <html@<b>>
* contrib/lisp/org-export.el (org-export-with-timestamps): Allow to
keep only active timestamps or inactive ones with respectively
`active' and `inactive' values.
(org-export--skip-p): Update tests to determine if a timestamp should
be ignored.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-element.el: Fix some comments.
* contrib/lisp/org-element.el (org-element-babel-call-parser): Fix
property name.
(org-element-babel-call-interpreter, org-element--element-block-re):
Fix docstring.
(org-element-clock-parser, org-element-clock-interpreter,
org-element-planning-parser, org-element-planning-interpreter): New
functions.
(org-element-time-stamp-parser): Move planning keywords out of the
object: no more `:appt-type' property
(org-element-time-stamp-interpreter,
org-element-time-stamp-successor): Apply changes to previous function.
(org-element-paragraph-separate): Time keywords also end paragraphs.
(org-element-all-elements): Register new elements types.
(org-element-current-element): Recognize new elements.
(org-element-parse-elements): Fix comments.
* testing/lisp/test-org-element.el: Add tests.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii--build-caption, org-e-ascii--list-listings,
org-e-ascii--list-tables, org-e-ascii--describe-links,
org-e-ascii-template--document-title, org-e-ascii-dynamic-block,
org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link,
org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not
provide back-end symbol.
* contrib/lisp/org-e-html.el (org-e-html--caption/label-string,
org-e-html-footnote-section, org-e-html-template,
org-e-html-dynamic-block, org-e-html-format-headline--wrap,
org-e-html-headline, org-e-html-item, org-e-html-link,
org-e-html-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-dynamic-block,
org-e-latex-footnote-reference, org-e-latex-headline,
org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link,
org-e-latex-src-block): Do not provide back-end symbol.
* contrib/lisp/org-e-odt.el (org-e-odt-format-preamble,
org-e-odt-format-label, org-e-odt-write-manifest-file,
org-e-odt--caption/label-string, org-e-odt-dynamic-block,
org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item,
org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block,
org-e-odt-time-stamp): Do not provide back-end symbol.
* contrib/lisp/org-export.el (org-export-get-environment): Provide
back-end symbol under `:back-end' property.
(org-export-collect-tree-properties, org-export-data,
org-export-filter-verbatim-functions, org-export-install-filters,
org-export-as, org-export-expand-macro,
org-export-filter-apply-functions, org-export-secondary-string):
Remove back-end references.
* testing/lisp/test-org-export.el: Update tests.
Back-end can be found in communication channel with (plist-get
info :back-end). Hence back-ends do not have to hard-code their name
in any transcoder. It will allow to derive a back-end from another
one.
* contrib/lisp/org-element.el (org-element-table-parser): Split tables
into table-row elements and table-cell objects.
(org-element-table-interpreter): Adapt interpreter to new code.
(org-element-table-row-parser, org-element-table-row-interpreter,
org-element-table-cell-parser, org-element-table-cell-interpreter,
org-element-table-cell-successor, org-element-table-row-successor,
org-element-restriction): New functions.
(org-element-headline-parser,
org-element-inlinetask-parser, org-element-item-parser,
org-element-verse-block-parser,
org-element-footnote-reference-parser,
org-element-collect-affiliated-keywords, org-element-parse-objects):
Use new function
(org-element-all-objects): Add new objects.
(org-element-target-parser): Small change to docstring.
(org-element-object-restrictions): Merge `org-element-string-restrictions'
into it.
(org-element-string-restrictions): Remove variable.
(org-element-parse-elements): Parse objects in non-recursive elements
with contents.
(org-element-normalize-string): Small refactoring.
(org-element-at-point): Handle table navigation.
* testing/lisp/test-org-element.el: Add tests.
* lisp/org-list.el (org-list-struct-indent): Follow
`org-list-demote-modify-bullet' specifications for ordered bullets.
(org-list-indent-item-generic, org-indent-item-tree,
org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* lisp/org.el (org-shiftmetaleft, org-shiftmetaright): Allow to
operate on a region.
* testing/lisp/test-org-list.el: Add tests.
* lisp/org-list.el (org-list-struct-indent): Follow
`org-list-demote-modify-bullet' specifications for ordered bullets.
(org-list-indent-item-generic, org-indent-item-tree,
org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* lisp/org.el (org-shiftmetaleft, org-shiftmetaright): Allow to
operate on a region.
* testing/lisp/test-org-list.el: Add tests.
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
Function renamed from `org-export-initial-options'.
(org-export-store-footnote-definitions): New function.
(org-export-as): Store footnote definitions at the appropriate place.
It happens twice if buffer gets expanded.
* testing/lisp/test-org-export.el: Add test.
* contrib/lisp/org-element.el (org-element-interpret--affiliated-keywords):
Fix interpretation of affiliated keywords.
(org-element-interpret-data): If no `:post-blank' property is
specified, assumed there is no blank line or whitespace after the
element or object.
* testing/lisp/test-org-element.el: Add a test.
* lisp/org-footnote.el (org-footnote-delete-definitions): Remove blank
lines before the footnote definition instead of removing those after
it.
* testing/lisp/test-org-footnote.el: Adapt tests.
* contrib/lisp/org-element.el (org-element-footnote-definition-parser):
Remove the need for `org-footnote-at-definition-p'.
(org-element-footnote-reference-parser): Remove the need for
`org-footnote-at-reference-p'.
(org-element-footnote-reference-successor): Do not use
`org-footnote-get-next-reference'.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-parse-elements): Enter
section type elements even if granularity is set to
`greater-element'.
(org-element-parse-buffer): Update doc-string.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-inlinetask-parser, org-element-item-parser,
org-element-verse-block-parser, org-element-current-element): New
optional argument so parsing of secondary string is not mandatory.
(org-element-parse-elements): Remove duplicate part from doc-string.
(org-element-at-point): Improve speed of function since secondary
string are never parsed.
(org-element-secondary-value-alist): Simplify doc-string.
* testing/lisp/test-org-element.el: Add test.
* contrib/lisp/org-export.el (org-export-as): Fix export with Babel
calls outside export scope by providing buffer's name holding full
data instead of the one holding its copy limited to scope.
* testing/lisp/test-org-export.el (test-org-export/export-scope): Add
a test.
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-lilypond.el: Make auditioning of midi and pdf asynchronous,
and add easy pdf generation in the form of `ly-gen-pdf' variable.
* testing/lisp/test-ob-lilypond.el: Tests for above.
* contrib/lisp/org-element.el (org-element-example-block-parser,
org-element-src-block-parser): Add `:number-lines',
`:preserve-indent, `:retain-labels', `:use-labels' and
`:label-fmt' properties.
* contrib/lisp/org-export.el (org-export-resolve-coderef,
org-export-get-loc): Apply changes to src-block and example-block
elements' properties.
(org-export-unravel-code, org-export-format-code,
org-export-format-code-default): New functions.
(org-export-handle-code): Removed function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-example-block): Use new
function.
(org-e-latex-src-block): Use new API. Better handling of numbered
lines with special packages.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-example-block,
org-e-ascii-src-block): Use new functions.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-element.el (org-element-map): New optional argument
to avoid recursion into certain recursive types.
* contrib/lisp/org-export.el (org-export-footnote-first-reference-p,
org-export-get-footnote-number,
org-export-collect-footnote-definitions): Use new argument from
`org-element-map'.
* testing/lisp/test-org-export.el: Add test.
The new argument allows to force entering footnotes definitions at
a certain time (when their first reference is found) but not a second
time when they are encountered in the parse tree.
Thanks to Jambunathan for reporting this.
* lisp/org-footnote.el (org-footnote-normalize): Fix normalization of
inline footnotes with no footnote section.
* testing/lisp/test-org-footnote.el: New test file.
Thanks to Samuel Wales for reporting this.
* lisp/org.el (org-link-search): Search for #+name affiliated keywords
and invisible targets.
* contrib/lisp/org-element.el (org-element-link-parser): Remove "ref"
links relative part.
(org-element-target-parser): Move property name from `:raw-value' to
`:value'.
(org-element-recursive-objects): Remove targets from tables. Cells
are not parsed unless explicitely asked by back-end developer, too
late. A target wouldn't be noticed in time. One solution could be to
parse every table, but that's time consumming.
(org-element-object-restrictions): Target are not recursive anymore.
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link): Find
elements with a matching "#+name: path" affiliated keyword.
(org-export-get-ordinal): Make special cases for headlines, items,
footnotes definitions and references.
(org-export-resolve-ref-link): Removed function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Handle
cross-reference numbers.
(org-e-latex-target): Targets have no contents.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--describe-links): Ignore
fuzzy links in link description at the end of the section.
(org-e-ascii-link): Handle cross-reference numbers.
* testing/contrib/lisp/test-org-export.el: Add tests.
* testing/lisp/test-org.el: Add tests.
* contrib/lisp/org-export.el (org-export-numbered-headline-p): New function.
* EXPERIMENTAL/org-e-ascii.el: Apply new function.
* EXPERIMENTAL/org-e-latex.el: Apply new function.
* testing/lisp/test-org-export.el: Add a test.
* testing/lisp/test-org-element.el: Moved location from
testing/contrib/lisp/ to testing/lisp.
* testing/lisp/test-org-export.el: Moved location from
testing/contrib/lisp/ to testing/lisp.
* 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
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:
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-exp.el (org-babel-exp-call-line-template): Control export of
additional call line information.
(org-babel-exp-non-block-elements): Fancier call line export.
* testing/examples/babel.org (an): Example data to test new call line
export.
* testing/lisp/test-ob-exp.el (ob-exp/export-call-line-information):
Test new call line export.
* lisp/ob-exp.el (org-babel-exp-results): Alter a copy of info.
* testing/examples/babel.org (an): Example data for test behavior.
* testing/lisp/test-ob-exp.el (ob-exp/noweb-no-export-and-exports-both):
Confirm proper behavior.
* lisp/ob-emacs-lisp.el: A comment on the last line of an emacs-lisp
code block would cause an error when the block is was executed. This
fix cures this behaviour.
* testing/lisp/test-ob-emacs-lisp.el: Regression tests for the above
fix.
* testing/examples/babel.org:
* testing/examples/table.org:
* testing/lisp/test-ob.el:
* testing/lisp/test-org-table.el:
Tests that used to write to a test-example file (ie testing/babel.org)
have been modified to write to temp files instead.
This avoids leaving open and /modified/ tests in Emacs when tests are
run by `org-test-run-all-tests'.
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-ref.el (org-babel-ref-split-args): Now uses
`org-babel-balanced-split'.
* testing/lisp/test-ob.el (test-ob/splitting-variable-lists-in-references):
Test new working behavior.
* 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.
* doc/org.texi (eval): Documenting the full range of :eval header
argument values.
* lisp/ob.el (org-babel-confirm-evaluate): Adding support for new
range of :eval header arguments.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Testing the
:eval header argument.
* lisp/ob-ref.el (org-babel-update-intermediate): New custom variable.
(org-babel-ref-resolve): Optionally update the in-buffer results of
code blocks which are evaluated to resolve references.
* lisp/ob.el (org-babel-join-splits-near-ch): Rejoins a list of a
split string when a character appears on either side of the split.
(org-babel-parse-multiple-vars): Rejoin splits around "=" signs.
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't limit
in-verbatim check to inline code blocks, do lob code blocks as well.
* testing/lisp/test-ob-lob.el (test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export):
Test ensuring that #+call lines in verbatim blocks are not evaluated
* lisp/ob.el (org-babel-named-src-block-regexp-for-name): Ensure that
partial names are not matched.
(org-babel-named-data-regexp-for-name): Ensure that partial names
are not matched.
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
Test to ensure that partial names are not matched.
* lisp/ob-ref.el (org-babel-ref-resolve): Search for named code blocks
before named data.
* lisp/ob.el (org-babel-named-data-regexp-for-name): New function for
finding named data.
* testing/lisp/test-ob.el (test-ob/resolve-code-blocks-before-data-blocks):
Test to ensure that named references are resolved in the correct
order.
* lisp/ob-ref.el (org-babel-ref-resolve): Don't change location when
looking at the contents.
* testing/lisp/test-ob.el (test-ob/catches-all-references): Test
enforcing the correct behavior.
* lisp/ob.el (org-babel-find-named-result): Downcase "name" before comparison.
* testing/lisp/test-ob.el (test-ob/does-not-replace-a-block-with-the-results):
Test that named code blocks are replaced with their results.
* testing/lisp/test-ob-R.el (featurep): Signal missing dependencies
with an error rather than a throw.
* testing/org-test.el (missing-test-dependency): Define the error
signal for missing dependencies.
(org-test-for-executable): Signal missing dependencies with an error
rather than a throw.
(org-test-load): Define an expected failing test for each file with
missing dependencies.
* testing/lisp/test-ob.el (test-org-babel/nested-code-block):
Evaluation of a nested block.
(test-org-babel/partial-nested-code-block): Evaluation of a
partially nested block.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Some valid
execution contexts (e.g., call lines) look like commented lines.
* lisp/ob.el (org-babel-get-src-block-info): Empty match string
doesn't count.
(org-babel-process-params): Always process parameters, even if you
don't to table splitting.
* testing/lisp/test-ob-C.el (ob-C/table): Ignore failures for this C
test.
* testing/lisp/test-ob-fortran.el (ob-fortran/input-var): Ignore
failures for this fortran test.
This results in the following behavior.
#+property: var foo=1
#+property: var+ bar=2
#+begin_src emacs-lisp
(+ foo bar)
#+end_src
#+results:
: 3
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=1 bar=2
* overwriting a file-wide property
:PROPERTIES:
:var: foo=7
:END:
#+begin_src emacs-lisp
foo
#+end_src
#+results:
: 7
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=7
* appending to a file-wide property
:PROPERTIES:
:var+: baz=3
:END:
#+begin_src emacs-lisp
(+ foo bar baz)
#+end_src
#+results:
: 6
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=1 bar=2 baz=3
* lisp/org.el (org-update-property-plist): Updates a given property
list with a property name and a property value.
(org-set-regexps-and-options): Use org-update-property-plist.
(org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
characters as well as groups of two characters.
(org-babel-parse-multiple-vars): Split variables on single spaces.
Nick Dokos <nicholas.dokos@hp.com> writes:
> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----
The attached version fixes these issues, Thanks -- Eric
>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE
Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.
- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
block may still be labeled with #+results:, and tables named with
#+tblname: will be considered to be named results
The following function may be used to update an existing Org-mode
buffer to the new syntax.
(defun update-org-buffer ()
"Update an Org-mode buffer to the new data, code block and call line syntax."
(interactive)
(save-excursion
(flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
"\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
(update (re new)
(goto-char (point-min))
(while (re-search-forward re nil t)
(replace-match new nil nil nil 1))))
(let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
(lob-re (to-re '("LOB")))
(case-fold-search t))
(update old-re "name")
(update lob-re "call")))))
Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
is installed on your system many of the important variables will
be pre-defined with a defvar and *will not* have their values
automatically updated, these include the following.
- org-babel-data-names
- org-babel-result-regexp
- org-babel-src-block-regexp
- org-babel-src-name-regexp
- org-babel-src-name-w-name-regexp
It may be necessary to either remove the source code of older
versions of Org-mode, or to explicitly evaluate the ob.el file.
* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
regular expression.
(org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
(org-babel-get-src-block-info): Updated match strings.
(org-babel-data-names): Simplified acceptable names.
(org-babel-find-named-block): Indentation.
(org-babel-find-named-result): Updated to not return a code block as
a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
references to old syntactic elements.
(org-additional-option-like-keywords): Removing references to old
syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
literal values of old regular expressions rather than their
behavior.
Please consider a patch to construct a table from the output of maxima
code block.
>From a0305117f4e793c93d7d10bc7aab04f96bd62e9c Mon Sep 17 00:00:00 2001
From: Litvinov Sergey <slitvinov@gmail.com>
Date: Sat, 1 Oct 2011 22:29:18 +0200
Subject: [PATCH] [ob-maxima] Construct a table from the output of the code block. Add
ert tests.
The first patch maps cpp language code to c++-mode. The second patch
adds tests for ob-C.
>From fba6eef6944766e675e4abe1d11d347b9a728031 Mon Sep 17 00:00:00 2001
From: Sergey Litvinov <slitvinov@gmail.com>
Date: Wed, 3 Aug 2011 22:03:19 +0200
Subject: [PATCH 2/2] Add tests for ob-C.el
* lisp/test-org-html.el (org-test-html/export-link): New
macro. Compose link export test.
(test-org-html/export-link-factory)
(test-org-html/export-link-alist): Remove factory variable and
function, use new macro instead.
* testing/org-test.el (org-exe-not-found): An error type used to
signal a missing executable
(org-test-for-executable): A function used by test files to throw an
error if a required executable is not present.
(org-test-load): Simply skip files for which the required
executables are not present.
* testing/lisp/test-ob-R.el: Conditional loading.
* testing/lisp/test-ob-awk.el: Conditional loading.
* testing/lisp/test-ob-fortran.el: Conditional loading.
* test-org.el (test-org/org-link-unescape-ascii-extended-char):
Explicitely set coding system for unescaped string.
Needed for Emacs22 to pass these tests. The input string is extended
ASCII which is covered by latin-1 coding system.
* testing/examples/babel.org (an): Test the combination of code block
results wrapper and type.
* testing/lisp/test-ob.el (test-org-babel/combining-scalar-and-raw-result-types):
Test the combination of code block results wrapper and type.
* testing/examples/org-exp.org: Example file for export tests.
* testing/lisp/test-org-exp.el (test-org-exp/stripping-commas): List
file for export tests.
> Hi
>
> I've added functionality to make ob-lilypond act in a consistent
> org-babel way by default (think ob-dot).
>
> The previous modus operandi is now known as arrange-mode and is
> selected by setting ly-arrange-mode to t
>
> More details including examples are at
> http://github.com/mjago/ob-lilypond
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Also check for in
verbatim emphasis.
(org-babel-exp-lob-one-liners): Cleaner checking for escaped call
lines.
* testing/examples/babel.org: Example data for new test.
* testing/lisp/test-ob-tangle.el
(ob-tangle/no-excessive-id-insertion-on-tangle): Safer to narrow,
and less work.
(ob-tangle/continued-code-blocks-w-noweb-ref): Testing new
:noweb-ref header argument.
* lisp/test-org-html.el (test-org-html/export-link-alist): New
variable. Abstract link export test definition.
(test-org-html/export-link-factory): New function. Create tests for
link export.
* test-org-table.el (test-org-table/org-table-convert-refs-to-rc/3)
(test-org-table/org-table-convert-refs-to-rc/2)
(test-org-table/org-table-convert-refs-to-rc/1)
(test-org-table/org-table-convert-refs-to-an/3)
(test-org-table/org-table-convert-refs-to-an/2)
(test-org-table/org-table-convert-refs-to-an/1): Provide tests for
table formular format conversion.
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).
* test-org.el (test-org/org-link-escape-ascii-character)
(test-org/org-link-escape-ascii-ctrl-character)
(test-org/org-link-escape-multibyte-character)
(test-org/org-link-escape-custom-table)
(test-org/org-link-escape-custom-table-merge)
(test-org/org-link-unescape-ascii-character)
(test-org/org-link-unescape-ascii-ctrl-character)
(test-org/org-link-unescape-multibyte-character)
(test-org/org-link-unescape-ascii-extended-char): New tests for
unicode aware percent escaping
All tests for escaping/unescaping multibyte characters are expected to
fail at the moment, because org-link-escape/unescape is not yet
unicode aware.
* lisp/ob.el (org-babel-sha1-hash): now handles more complex types in
params
* testing/examples/babel.org: whitespace
* testing/lisp/test-ob.el (test-org-babel/sha1-hash): new test for
babel hashing
* lisp/ob-lob.el (org-babel-lob-execute): now expanding variable
references before execution
* lisp/ob.el (org-babel-merge-params): better indentation, and finally
sorted out the proper replacement of conflicting variable
definitions
ob-get-src-block-info wasn't correctly returning the name of the
code block
* lisp/ob-lob.el (org-babel-lob-ingest): now returns the count of
ingested code blocks
* lisp/ob.el (org-babel-get-src-block-info): walks up possible
additional header arg lines before checking for the code block name
(org-babel-merge-params): can now handle empty variables gracefully
includes a simple export test
* lisp/ob-exp.el (org-babel-exp-in-export-file): wrapper for
collecting information from within the original export file
(org-babel-exp-src-blocks): simplified through use of the above
macro
(org-babel-exp-code): simplified through the use of new functions
for parsing header arguments
(org-babel-exp-results): simpler high-level organization, also this
is now where the expansion of variable references takes place during
export
* lisp/ob.el (org-babel-expand-variables): broke variable replacement
in a parameter list into it's own function
(org-babel-get-src-block-info): now using the above function
for example, from the test of this functionality
* multi-line header arguments
:PROPERTIES:
:ID: b77c8857-6c76-4ea9-8a61-ddc2648d96c4
:END:
(map 'list #'list numbers letters)
| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
| 6 | f |
| 7 | g |
* lisp/ob.el (org-babel-multi-line-header-regexp): new variable for
matching header lines preceding code blocks
(org-babel-src-name-w-name-regexp): now includes possible header
lines between source name and code block
(org-babel-get-src-block-info): now also collecting header arguments
from preceding header lines
(org-babel-src-block-names): updated match-string to reflect new
value of org-babel-src-name-w-name-regexp
(org-babel-merge-params): fixed error in variable string regexp