* testing/lisp/test-ob.el (test-ob/remove-inline-result): Check that
whitespace in `src_emacs-lisp{1} {{{results(=1=)}}}.' is removed by
`org-babel-remove-inline-result', and that whitespace following the
macro (if any) is left intact.
* lisp/org-clock.el (org-clock-in-last): `org-clock-in' expects an
universal argument, not the return value of `org-clock-select-task'.
Reported-by: Peter Münster <pmlists@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/94331>
* ob.core.el (org-babel-remove-inline-result): Removing an inline src
block result removes all whitespace preceding it. The function is
now `interactive'.
* ob-core.el (org-babel-insert-result): The call to
`org-babel-remove-inline-result' preceeds insertion of whitespace
and setting location of local variable `inlinep'.
Daniele Pizzolli reported that cleaning a buffer by evaluating
`org-babel-remove-inline-result' can leave unwanted whitespace. That
bug is fixed, and the function is made `interactive'.
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Ensure
point is at a real body line and not in front of meta data, so
regular contents can be inserted safely after a call to this
function.
Reported-by: Samuel Loury <konubinix@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94482>
* lisp/org.el (org-special-properties): Add missing "CATEGORY".
* doc/org.texi (Special properties): Remove "NOBLOCKING" as a special
property, since it can only be set through a properties drawer.
This is a reserved property.
Reported-by: Samuel Loury <konubinix@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94483>
* lisp/org-element.el (org-element-swap-A-B):
* lisp/org-list.el (org-list-swap-items):
(org-list-send-item): In order to preserve visibility of moved items
or elements, only consider inner overlays.
Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94320>
* test/examples/babel.org: Miscellaneous fixes for new inline src
block schema. Return a scalar to avoid unwanted error. Return a raw
result from `src_emacs-lisp' to make checking results cleaner than
dealing with `results' macro.
* testing/lisp/test-ob-exp.el: Wrap some expected results in
`{{{results(' and ')}}}' and drop `=%s=' formatting of others.
* testing/lisp/test-ob-lob.el: Wrap some expected results in
`{{{results(' and ')}}}'.
* testing/lisp/test-ob.el: Wrap some expected results in `{{{results('
and ')}}}'.
* testing/lisp/test-ob.el
(test-org-babel/org-babel-get-inline-src-block-matches,
test-org-babel/inline-src_blk-results-silent): Tests of inline src
block matches (and `org-ctrl-ctrl-c') conform to the `:begin' and
`:end' properties of `org-element-context'.
* testing/lisp/test-ob.el
(test-org-babel/inline-src_blk-default-results-replace-line-1,
test-org-babel/inline-src_blk-default-results-replace-line-2):
Inline results are self replacing.
* lisp/ob-core.el (org-babel-remove-inline-result): Delete results of
current inline src block or inline babel call if it is wrapped in a
"{{{results(.*)}}}" macro call.
* lisp/ob-core.el (org-babel-get-lob-one-liner-matches): Ensure that
the point ends up on the same line as, and just before, `call_'
before setting match-data.
* ob-core.el (org-babel-get-inline-src-block-matches): Use
`org-element-context' and friends to find inline-src-block. When
point is in an inline-src-block (including white space determined by
:post-blank) set match-data and return `t'.
* lisp/ob-core.el (org-babel-insert-result): Delete any `results'
macro following current inline src block or babel call; insert
current value in 'results' macro possibly wrapping RESULT in an
export snippet or inline source block first. Use of `:results list'
or `:results table', or use of a multiline RESULT (after stripping a
trailing newline) or a list RESULT from an inline src block or babel
call throws an error.
* ob-exp.el (org-babel-exp-do-export): `clean' lambda form removes inline
results wrapped in `results{{{(' and `)}}}' by calling
`org-babel-remove-inline-result'.
* lisp/ox-org.el (org-org-link): New function.
This patch allows to handle `org' export format in EXPORT argument
from `org-add-link-type'.
Suggested-by: John Kitchin <johnrkitchin@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94439>
* lisp/org-element.el (org-element-headline-parser): Remove :alt-title.
* lisp/ox.el (org-export-get-alt-title): Check regular :ALT_TITLE
property instead of :alt-title.
`:alt-title' is an export-specific property. As a consequence, it's
value doesn't need to be parsed at "org-element.el"'s level. There, it
is treated as a regular property : `ALT_TITLE'.
This also removes the last call to
`org-element-parse-secondary-string' from "org-element.el".
* lisp/ox-ascii.el (org-ascii--current-text-width): Compute contents'
text width according to exported tag instead of original one.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/94416>
* lisp/org-element.el (org-element-headline-parser,
org-element-inlinetask-parser, org-element-item-parser,
org-element--collect-affiliated-keywords): Use
`org-element--parse-objects' instead of
`org-element-parse-secondary-string' when parsing live objects in
secondary strings.
`org-element-parse-secondary-string' parses a given string in
a temporary buffer, rendering buffer position related
properties (e.g., :begin) invalid.
Reported-by: John Kitchin <johnrkitchin@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94397>
* lisp/org-element.el (org-element-headline-interpreter,
org-element-inlinetask-interpreter): Use format control string
instead of calling `char-to-string'.
* lisp/org-element.el (org-element--parsed-properties-alist): New
variable.
(org-element-map): Remove unnecessary funcalls. Externalize some
computations in the variable above.
* testing/lisp/test-ob-lob.el (test-ob-lob/call-with-header-arguments):
Replace `cl-letf' with `letf' for compatibility with older Emacsen.
* testing/lisp/test-org-timer.el (test-org-timer/other-timer-error):
Also check for 'error since 'user-error is not used by older Emacsen.
* lisp/ox.el (org-export-collect-tree-properties): Do not
set :ignore-list.
(org-export--populate-ignore-list): Remove function.
(org-export--selected-trees): Small refactoring.
(org-export-prune-tree): New function.
(org-export-remove-uninterpreted-data): Fix docstring.
(org-export-as): Prune tree before calling tree filter.
* testing/lisp/test-ox.el (org-test-with-parsed-data): Fix macro.
This patch introduces two changes in the export process:
1. Non-exported elements are removed from the tree instead of being
moved into an ignore list (with the exceptions of tables rows
and cells)
2. Parse tree filter is called on the tree being exported, not the
original one.
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/94162>
* lisp/ob-R.el (org-babel-R-eoe-indicator):
(org-babel-R-eoe-output): Convert from defvar to defconst.
(org-babel-R-write-object-command): Convert from defvar to defconst.
Add line breaks and indentation.
* lisp/ob-core.el (org-babel--script-escape-inner): New function.
(org-babel-script-escape): Use it.
* testing/lisp/test-ob.el (test-org-babel/script-escape): New test.
* testing/examples/babel.org: Change spaces to dashes in #+name
lines.
* testing/lisp/test-ob-exp.el (org-test-with-expanded-babel-code):
(ob-exp/evaluate-all-executables-in-order):
(ob-exp/exports-inline-code):
(ob-exp/exports-inline):
(ob-exp/exports-inline-code-double-eval):
(ob-exp/exports-inline-code-eval-code-once):
(ob-exp/exports-inline-code-double-eval-exports-both):
(ob-exp/use-case-of-reading-entry-properties):
(ob-exp/export-from-a-temp-buffer):
(ob-export/export-with-results-before-block):
(ob-export/export-under-commented-headline):
* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines):
* testing/lisp/test-ob.el (test-org-babel/inline-src_blk-default-results-replace-line-1):
(test-org-babel/inline-src_blk-default-results-replace-line-2):
(test-org-babel/inline-src_blk-manual-results-replace):
(test-org-babel/inline-src_blk-results-scalar):
(test-org-babel/inline-src_blk-results-verbatim):
(test-org-babel/inline-src_blk-preceded-punct-preceded-by-point):
* testing/lisp/test-ox.el (test-org-export/export-scope):
Bind ‘org-babel-inline-result-wrap’ and/or ‘org-export-babel-evaluate’
so tests work when users have customized these variables.
* testing/lisp/test-ob-exp.el (ob-export/export-with-results-before-block):
Add ‘org-trim’ where an extra newline was creeping in.
* testing/lisp/test-ob-lob.el (test-ob-lob/call-with-header-arguments):
Neutralize org-babel-insert-result, which was stomping on the buffer
contents and disrupting the test
* testing/lisp/test-org-element.el (test-org-element/block-switches):
Replace (should (and ...)) with multiple (should ...). This gives
more precise indications of what is wrong when a test fails.
(test-org-element/link-parser): Require org-docview.
* testing/lisp/test-org-timer.el (test-org-timer/other-timer-error):
Add the error type for ‘should-error’.
* testing/lisp/test-ox.el (test-org-export/set-title):
(test-org-export/handle-options):
(test-org-export/with-timestamps):
(test-org-export/comment-tree):
(test-org-export/handle-inlinetasks): Let
‘org-export-filter-body-functions’ and
‘org-export-filter-final-output-functions’ to nil where an empty
string is the expected result. ‘org-export-filter-apply-functions’
treats an empty string as special, and changes it to nil. This
creates test failures when the user has customized these variables.
* testing/org-test.el (org-test-with-temp-text): Let ‘org-mode-hook’
to nil.
(org-test-table-target-expect): Require ert since this function calls
some of its should* functions.
* lisp/ob-core.el (org-babel-get-inline-src-block-matches): Use
`org-looking-at-p' instead of `thing-at-point'.
The latter could give odd results depending on the syntax table. In
particular, for me (thing-at-point 'word) was returning src_foo in
this context.
* lisp/ox.el (org-export-ignore-element): Remove function.
(org-export-collect-tree-properties): Do not assume users can
modify :ignore-list export property.
* testing/lisp/test-ox.el (test-org-export/user-ignore-list): Remove
test.
:ignore-property is an implementation detail, which should not be
exposed to users. Also, it is easier to simply remove the element to
ignore from the parse tree with `org-element-extract-element'.
* doc/org.texi (Export settings): Add UNNUMBERED property to concept
index. Fix number of spaces at the end of a sentence. Use @code
instead of @samp for reserved properties.