* ob-table.el (org-sbe): Add an explicit case for handling list
arguments. This avoids doing the wrong thing (%s-formatting a list,
thus losing syntax like double-quotes). This enables passing org-table
ranges through org-sbe in a simple and correct manner.
* test-ob-table.el: Add test.
* ob-table.el (org-sbe): org-sbe did the wrong thing when given a
reference to a cell containing quotes or backslashes, because it would
simply wrap any $-prefixed value in quotes, without any escaping. Fix
this by using "%S" (instead of "\"%s\"").
* test-ob-table.el: Add test.
* lisp/org.el (org-set-tags-to): Do not throw an error on empty
headlines.
* testing/lisp/test-org.el (test-org/set-tags): Move test.
(test-org/set-tags-to): New test.
Reported-by: Adrian Bradd <a.bradd@columbia.edu>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00210.html>
* lisp/org-table.el (org-table-recalculate): Return an error when the
formula cannot create a necessary column.
(org-table-formula-create-columns): Fix docstring.
* testing/lisp/test-org-table.el (test-org-table/field-formula-outside-table):
Fix tests.
* lisp/ob-core.el (org-babel-expand-noweb-references): Get :noweb-ref
from definition instead of point of call.
* testing/lisp/test-ob.el (test-ob/noweb-expansion-1):
(test-ob/noweb-expansion-2): Merge tests. Add test.
* lisp/ob-python.el (orb-babel-python-evaluate-session): When :session
:results output, send multiline code blocks to tmpfile and execute in
Python with exec().
(org-babel-python--exec-tmpfile): New variable.
* testing/lisp/test-ob-python.el (test-ob-python/session-multiline):
Test for :session with multiple lines and indentation.
* lisp/org.el (org-return): Split the table before first column or
after last one.
* lisp/org-table.el (org-table-next-row): Remove code handling split.
* testing/lisp/test-org.el (test-org/return): Add test.
* lisp/ox-publish.el (org-publish-file-relative-name): New function.
* lisp/ox-html.el (org-html-link): Use new function.
* testing/lisp/test-ox-publish.el (test-org-publish/file-relative-name):
New test.
* lisp/ox.el (org-export-numbered-headline-p): Use a less opinionated
definition of inheritance.
* testing/lisp/test-ox.el (test-org-export/numbered-headline-p):
Update test.
* doc/org.texi (Export settings): Insist on UNNUMBERED inheritance.
It is now possible to number a headline within an unnumbered tree.
* lisp/org-table.el (org-table-recalculate): Clean `:org-untouchable'
property once we no longer need it.
* testing/lisp/test-org-table.el (test-org-table/formula-priority):
New test.
Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00159.html>
* lisp/org-element.el (org-element--list-struct): Correctly handle end
of sub-lists and end of last item.
* testing/lisp/test-org-element.el (test-org-element/item-parser):
(test-org-element/plain-list-parser): Add tests.
* lisp/org-capture.el (org-capture-mark-kill-region): Set end marker
insertion type so that it advances when inserting text at the end of
the capture buffer.
* testing/lisp/test-org-capture.el (test-org-capture/insert-at-end-abort):
Add test case.
Inserting text at the end of the capture buffer does not advance the
end kill marker. This causes the narrowing region and the kill
markers to get out of sync, which prevents 'org-capture-finalize' from
correctly cleaning the target buffer when aborting the capture.
Setting the kill end marker insertion type fixes this.
TINYCHANGE
* lisp/ob-tangle.el (org-babel-tangle-single-block): Prevent double unescaping
of source block by removing unnecessary call to `org-unescape-code-in-string'.
* testing/lisp/test-ob-tangle.el (ob-tangle/nested-block) New function.
* lisp/org.el (org-insert-todo-heading): Insert TODO keyword relative
to the original headline, not to the headline above.
* testing/lisp/test-org.el (test-org/insert-todo-heading-respect-content):
Add test.
* lisp/org-clock (org-clocktable-steps): Fix weekly-step clock report
ignoring hours between start of period and start of week, when start
of period is on a day of week numerically less than start of week.
Clock report now always inserts a "week" starting at the start of
the period, if necessary; all following weeks start on the start of
the week as expected.
TINYCHANGE
* lisp/org.el (org-backward-paragraph): Do not error when called from
a block opening line.
* testing/lisp/test-org.el (test-org/backward-paragraph): Add tests.
Reported-by: Omar Antolin <omar.antolin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00051.html>
* lisp/ox-publish.el (org-publish-get-base-files): Ensure MATCH regexp
is always a string since `directory-files-recursively' requires it.
* testing/lisp/test-ox-publish.el (test-org-publish/get-project-from-filename):
Add test.
Suggested-by: Jens Lechtenboerger <lechten@wi.uni-muenster.de>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00528.html>
* lisp/ob-scheme.el (org-babel-scheme-execute-with-geiser): Return
"#<void>" or "#<unspecified>" when the REPL says so.
* testing/lisp/test-ob-scheme.el (test-ob-scheme/unspecified): New
test.
(test-ob-scheme/prologue): Fix tests.
Reported-by: Lawrence Bottorff <borgauf@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00346.html>