Commit Graph

921 Commits

Author SHA1 Message Date
Nicolas Goaziou 69dd4301ab ox: Remove comments and comment blocks prior to export
* lisp/ox.el (org-export--delete-comments): Renamed from
  `org-export--delete-commented-subtrees'.  Also remove comments and
  comment blocks.
(org-export-as): Apply renaming.

* testing/lisp/test-ox.el (org-test-with-parsed-data): Apply renaming.

From the export point of view COMMENTed subtrees and regular comments
are expected to be treated in the same way.
2015-03-28 10:27:04 +01:00
Nicolas Goaziou fa0cc0ab70 Revert "Fix c9a52787c14c3a7429bcd3c8975350525e0baa04"
This reverts commit 359572d37e.

COMMENT headlines are expected to be ignored completely during export.
2015-03-28 09:54:37 +01:00
Nicolas Goaziou 22f732c255 Fuzzy links to headlines ignore COMMENT keywords
* lisp/org.el (org-link-search): Ignore COMMENT keyword.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add test.

Reported-by: Martin Carlé <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96413>
2015-03-26 21:05:27 +01:00
Nicolas Goaziou 359572d37e Fix c9a52787c1
* lisp/org-macro.el (org-macro--collect-macros): Ignore macro
  definitions in commented subtrees.
* lisp/ox.el (org-export--get-inbuffer-options): Ignore options in
  commented subtrees.
(org-export--delete-commented-subtrees): Remove function.
(org-export-as): Apply removal.

Removing the whole subtree is not subtle as Babel might want to use
data there.

Reported-by: Robert Klein <RoKlein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/96347>
2015-03-24 09:35:39 +01:00
Nicolas Goaziou c9a52787c1 ox: Ignore export settings in commented subtrees
* lisp/ox.el (org-export--delete-commented-subtrees): New function.
(org-export-as): Use new function.

* testing/lisp/test-ox.el (org-test-with-parsed-data,
  test-org-export/get-inbuffer-options): Use new function.
(test-org-export/expand-macro): Add tests.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/96267>
2015-03-24 00:32:15 +01:00
Nicolas Goaziou f7b27896e9 ox: Rename some internal functions
* lisp/ox.el (org-export--prune-tree): Renamed from
  `org-export-prune-tree'.  Move it close to its caller.
(org-export--remove-uninterpreted-data): Renamed from
`org-export-remove-uninterpreted-data'.  Move it close to its caller.
(org-export--remove-uninterpreted-data-1): Move internal function
close to its caller.
(org-export-as): Apply renaming.

* testing/lisp/test-ox.el (org-test-with-parsed-data): Apply renaming.
2015-03-24 00:09:46 +01:00
Nicolas Goaziou 5a550938ce org-list: Modify M-RET on a description tag
* lisp/org-list.el (org-list-insert-item): On a description tag,
  insert item before current one.  However, past the colons, insert it
  after.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add
  tests.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96330>
2015-03-23 23:35:57 +01:00
Nicolas Goaziou e0b19dedb9 ox: Throw an error on unresolved id links
* lisp/ox.el (org-export-get-environment): Properly find file
  associated to id link.
(org-export-resolve-id-link): Throw an error on unresolved id links.

Use `org-id-find' instead of `org-id-find-id-file' as the latter may
returns the file attached to current buffer on search failure.

Reported-by: Jacob Gerlach <jacobgerlach@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96020>
2015-03-17 23:31:49 +01:00
Jacob Gerlach dc08e98885 ox.el: Issue error for unresolved fuzzy link
* lisp/ox.el (org-export-resolve-fuzzy-link): Throw an error instead
  of returning nil when link can't be resolved.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Change
  last test from should-not to should-error

In addition to throwing an error, don't store the failed match in the
link cache.

TINYCHANGE
2015-03-17 22:46:05 +01:00
Nicolas Goaziou a886b23476 ox: Throw an error on unresolved coderef
* lisp/ox.el (org-export-resolve-coderef): Throw an error on
  unresolved coderef.

* testing/lisp/test-ox.el (test-org-export/resolve-coderef): Update
  test.
2015-03-17 22:42:45 +01:00
Nicolas Goaziou 16cea3d7b7 ox: Remove `comment' special value for `org-export-with-creator'
* lisp/ox.el (org-export-with-creator): Change default value.

* lisp/ox-ascii.el (org-ascii-template):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-template):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-org.el (org-org-template):
* lisp/ox-texinfo.el (org-texinfo-template): Treat
  `org-export-with-creator' as a boolean.

* testing/lisp/test-ox.el (test-org-export/parse-option-keyword):
  Update test.

* doc/org.texi (Export settings): Update allowed values in
  `org-export-with-creator'.

* etc/ORG-NEWS: Signal change.

Special `comment' value isn't meaningful for all back-ends and is not
implemented in every back-end where it makes sense anyway.

It is possible to add a comment including creator at the end of the
document using a body filter instead.
2015-03-17 15:51:22 +01:00
Gustav Wikström 8562bd09ec org: Nesting grouptags
* lisp/org.el (org-tags-expand): Nesting grouptags.

  Allowing subtags to be defined as groups themselves.

  : #+TAGS: [ Group : SubOne(1) SubTwo ]
  : #+TAGS: [ SubOne : SubOne1 SubOne2 ]
  : #+TAGS: [ SubTwo : SubTwo1 SubTwo2 ]

  Should be seen as a tree of tags:
  - Group
    - SubOne
      - SubOne1
      - SubOne2
    - SubTwo
      - SubTwo1
      - SubTwo2

  Searching for "Group" should return all tags defined above.
2015-03-16 22:27:38 +01:00
Gustav Wikström ee45258cfe org: Grouptags not unique and can contain regexp
* lisp/org.el (org-tags-expand): Grouptags can have regular expressions as
  "sub-tags".

  The regular expressions in the group must be marked up within { }.
  Example use:

  : #+TAGS: [ Project : {P@.+} ]

  Searching for the tag Project will now list all tags also including
  regular expression matches for P@.+.  Good for example if tags for a
  certain project is tagged with a common project-identifier,
  i.e. P@2014_OrgTags.

* lisp/org.el (org-tag-alist) : New symbols for grouptags when the
  tags in the group don't have to be distinct on a heading.

  Grouptags had to previously be defined with { }.  This syntax is
  already used for exclusive tags and Grouptags need their own,
  non-exclusive syntax.  This behaviour is achieved with [ ].  Note: {
  } can still be used also for Grouptags but then only one of the
  given tags can be used on the headline at the same time.  Example:

  [ group : sub1 sub2 ]

  Grouptags also are not filtered when setting up tags.  This means
  they can exist multiple times in org-tag-alist list.  It will be
  usable if nesting of grouptags is ever to become reality.

  There is a slightly annoying side-effect when setting tags in that a
  tag which is both a part of a grouptag and a grouptag of it's own
  will get multiple key-choices in the selection-UI.

* lisp/org.el (org--setup-process-tags): Adaption for the added syntax
  for non-distinct grouptags.

* lisp/org.el (org-fast-tag-selection): Add support for the added,
  non-unique, grouptag-syntax.  Minor (if ...) to (when ...) refactor.
2015-03-16 22:27:26 +01:00
Nicolas Goaziou 84d6ff4ec1 Fix `org-entry-delete' with accumulated properties
* lisp/org.el (org-entry-delete): Remove all occurrences of
  accumulated properties, too.  Return a non-nil value when some
  property was removed.

* testing/lisp/test-org.el (test-org/entry-delete): Add test.
2015-03-15 16:53:42 +01:00
Nicolas Goaziou 269b680900 Fix CUSTOM_ID search
* lisp/org.el (org-link-search): Avoid false positives when searching
  CUSTOM_ID property.

* testing/lisp/test-org.el (test-org/custom-id): Add test.
2015-03-15 15:49:05 +01:00
Nicolas Goaziou 7072dba04d Implement `org-find-property'
* lisp/org.el (org-find-property): New function.
* testing/lisp/test-org.el (test-org/find-property): New test.
2015-03-15 15:49:05 +01:00
Nicolas Goaziou 1de825df31 Fix CATEGORY property
* doc/org.texi (Special properties): Remove "CATEGORY"

* lisp/org.el (org-special-properties): Remove "CATEGORY".
(org-property-get-allowed-values): Ignore "CATEGORY".
(org-entry-get): Make sure to get CATEGORY value using
`org-entry-properties'.

* testing/lisp/test-org.el (test-org/entry-put): Add test.

"CATEGORY" is not a special property as it can also be set using
a properties drawer.
2015-03-11 17:12:49 +01:00
Nicolas Goaziou bf4a645cac org-element: Fix indentation removal with line breaks
* lisp/org-element.el (org-element-line-break-parser): Tiny
  refactoring.
(org-element-normalize-contents): Take into consideration line breaks
when removing common indentation.  Small refactoring.

* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
  Add tests.
2015-03-07 01:58:28 +01:00
Nicolas Goaziou c76f254e8b ox: Fix custom link handling in anonymous back-end
* lisp/ox.el (org-export-custom-protocol-maybe): Change signature.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-org.el (org-org-link):
* lisp/ox-texinfo.el (org-texinfo-link): Apply signature change.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe):
  Update test.

Provide explicitly back-end used instead of guessing it from INFO
channel as an anonymous back-end could be used, masquerading the real
one.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95402>
2015-02-24 15:54:01 +01:00
Nicolas Goaziou ad7b7efcdc ob-core: Fix inserting improper lists
* lisp/ob-core.el (org-babel-insert-result): Fix output when result is
  an improper list, which cannot be turned into a table.

* testing/lisp/test-ob.el (test-ob/org-babel-insert-result--improper-lists):
  New test.

Reported-by: Daniele Pizzolli <dan@toel.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/95348>
2015-02-23 18:44:52 +01:00
Nicolas Goaziou 4eb4f47141 Simplify `org-show-context' configuration
* lisp/org.el (org-show-context-detail): New variable.
(org-context-choice, org-show-following-heading, org-show-siblings,
org-show-entry-below, org-show-hierarchy-above): Remove variables.
(org-show-set-visibility): New function.
(org-convert-to-oddeven-levels, org-get-location, org-show-context,
org-reveal): Use new function.
(org-link-search): Update docstring.

* lisp/org-agenda.el (org-agenda-cycle-show): Use new function.
(org-agenda-show): Replace missing variable.

* testing/lisp/test-org.el (test-org/show-set-visibility): New test.

* doc/org.texi (Sparse trees):
* doc/orgguide.texi (Sparse trees): Document changes.

* etc/ORG-NEWS: Signal changes.

Configuration of `org-show-context' is done with a single variable
offering six different views, instead of four variables for a total
of 16 configurations.
2015-02-22 14:57:09 +01:00
Nicolas Goaziou fa145361ec ox: Allow to narrow scope in footnotes API
* lisp/ox.el (org-export--footnote-reference-map,
  org-export-collect-footnote-definitions,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number): Allow to specify scope, through
  a new optional argument.

* lisp/ox-odt.el (org-odt-footnote-reference): Apply API change.

* testing/lisp/test-ox.el (test-org-export/footnote-first-reference-p,
  test-org-export/get-footnote-number,
  test-org-export/collect-footnote-definitions): Update tests.
2015-02-21 11:29:40 +01:00
Nicolas Goaziou 014de0a532 ox: Change `org-export-collect-footnote-definitions' signature
* lisp/ox.el (org-export-collect-footnote-definitions): Refactor
  code.  Change signature.

* testing/lisp/test-ox.el (test-org-export/collect-footnote-definitions):
  New test.
(test-org-export/footnotes): Update test.

* lisp/ox-ascii.el (org-ascii-inner-template):
* lisp/ox-html.el (org-html-footnote-section): Apply signature change.

* etc/ORG-NEWS: Document signature change.

This change makes `org-export-collect-footnote-definitions' compatible
with `org-export-get-footnote-number' and
`org-export-footnote-first-reference-p'.
2015-02-20 18:06:23 +01:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Nicolas Goaziou 176681bc65 org-footnote: Be more strict about location for new footnotes
* lisp/org-footnote.el (org-footnote--allow-reference-p): New
  function.
(org-footnote-new): Use new function.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): New test.

In particular, Org now refuses to add a footnote reference in
a keyword, e.g., TITLE.
2015-02-15 21:56:57 +01:00
Nicolas Goaziou 836d9db8a9 org-list: Fix continuated items repair
* lisp/org-list.el (org-list-struct-apply-struct): Preserve disparate
  indentation in contuated contents, i.e., contents after a plain list
  still within an item.

* testing/lisp/test-org-list.el (test-org-list/repair): Add test.

This fixes the following case:

  - item
     - child
     item contents
       with different indentation

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94977>
2015-02-14 12:37:41 +01:00
Nicolas Goaziou 55ce4b74b3 Fix `org-return' on list items
* lisp/org.el (org-return): Properly preserve list structure when
  calling `org-return-indent' on an item.

* testing/lisp/test-org.el (test-org/return): Add test.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/94977>
2015-02-14 02:07:18 +01:00
Nicolas Goaziou e50baa4cf7 Fix `org-time-stamp'
* lisp/org.el (org-time-stamp): Correctly match repeater, if any.
  Refactor code.

* testing/lisp/test-org.el (test-org/time-stamp): New test.

Reported-by: Nicolas Richard <theonewiththeevillook@yahoo.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/94974>
2015-02-13 21:54:21 +01:00
Nicolas Goaziou ccb663c742 ox: Add optional order argument to some footnotes related functions
* lisp/ox.el (org-export--footnote-reference-map): New function.
(org-export-footnote-first-reference-p,
org-export-get-footnote-number): Allow to change order when footnotes
references are contained within footnote definitions.

* testing/lisp/test-ox.el (test-org-export/footnote-first-reference-p):
(test-org-export/get-footnote-number):  New tests.
(test-org-export/footnotes): Update test.
2015-02-13 14:10:51 +01:00
Rasmus e6fcc853c5 ox: Optional export of title
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
  ox-ascii.el (org-ascii-template--document-title),
  ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
  ox-latex.el (org-latex-template), ox-man.el (org-man-template),
  ox-odt.el (org-odt-template), ox-org.el (org-org-template),
  ox-publish.el (org-publish-project-alist),
  ox-texinfo.el (org-texinfo-template),
  ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.

This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
2015-02-12 01:45:39 +01:00
Nicolas Goaziou 650278f775 org-element: Interpret pseudo objects without declaration
* lisp/org-element.el (org-element-object-containers): New variable
(org-element-interpret-data): Remove optional argument.
(org-element--interpret-data-1): Remove optional argument.  Guess when
a given element or object has a pseudo type.

* lisp/ox-latex.el (org-latex-pseudo-objects): Remove variable.
(org-latex-table, org-latex--math-table): Apply signature change above.

* testing/lisp/test-org-element.el (test-org-element/interpret-data):
  Update test.
2015-02-09 12:04:38 +01:00
Nicolas Goaziou 16841306ed Use `org-element-copy'
* lisp/org.el (org-timestamp-split-range): Use `org-element-copy'.  Do
  not preserve :parent property anymore.

* lisp/ox.el (org-export-as): Use `org-element-copy'.

* testing/lisp/test-org.el (test-org/timestamp-split-range): Update test.
2015-02-09 10:15:59 +01:00
Nicolas Goaziou 70933a3dd6 org-element: Implement `org-element-copy'
* lisp/org-element.el (org-element-copy): New function.
* testing/lisp/test-org-element.el (test-org-element/copy): New test.
2015-02-09 10:07:34 +01:00
Rasmus 8f38f037b4 ox.el: {{{date}}} formatting argument
* ox.el (org-export-as): Allow {{{date}}} to take formatting-argument.
* org.texi (Macro replacement): Document {{{date}}} formatting.
* test-ox.el (test-org-export/expand-macro): Test {{{data(format)}}}
* org-NEWS: Mention optional {{{data}}} argument.

Optional argument to {{{date}}} like {{{date(FMT)}}} are treated
similar to {{{time(FMT)}}} if \#+DATE is a timestamp.
2015-02-09 01:47:21 +01:00
Nicolas Goaziou ca0199c7ee `org-insert-heading' can be forced to insert top-level headline
* lisp/org.el (org-insert-heading): Change signature.  Tiny refactoring.
* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
2015-02-08 01:43:30 +01:00
Alan Schmitt 6d691e2aa8 Function `org-link-search' does exact headline search
* lisp/org.el (org-link-search): Change headline search such that it
always does an exact search, ignoring spaces.

* testing/lisp/test-org.el (test-org/fuzzy-links): Test exact headline
match with spaces and cookies.

* doc/org.texi (External links): Cleanup footnote about the
`org-link-search-must-match-exact-headline' option for text searches
and add a footnote about the effect of the same option for heading
searches.

* doc/ORG-NEWS: Document changes.
2015-02-07 22:42:40 +01:00
Nicolas Goaziou 55c0708bc4 org-element: Externalize docview links
* lisp/org-element.el (org-element-link-type-is-file): Remove.
(org-element-link-parser): Do not treat specially anymore "docview"
link type.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update test.

* lisp/org-docview.el (org-docview-export): Fix path.

"docview" is a custom link type handled in its own library.  There is
no reason to include it in core parser.
2015-02-03 23:00:21 +01:00
Charles Berry f9ab1e8ab6 testing/lisp/test-ob.el: Add `test-ob/remove-inline-result'
* 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.
2015-01-31 11:05:18 -08:00
Nicolas Goaziou 98a1bc868a Replace `org-end-of-meta-data-and-drawers'
* lisp/org.el (org-end-of-meta-data): New function.
(org-end-of-meta-data-and-drawers): Remove function.

* lisp/org-capture.el (org-capture-place-plain-text): Use new
  function.

* testing/lisp/test-org.el (test-org/end-of-meta-data): New test.

* etc/ORG-NEWS: Document removal.
2015-01-30 19:31:27 +01:00
Sebastien Vauban f7e68cec78 Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe'
* testing/lisp/test-ob-emacs-lisp.el, test-ob-ruby.el, test-ob.el: Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe'.
2015-01-30 18:28:05 +01:00
Charles Berry 90e18aed9c testing/*: Inline result tests modified to follow current schema
* 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.
2015-01-29 12:05:31 -08:00
Achim Gratz ee01a70adb rework fix in82599d37e1 to use should-error macro
* testing/lisp/test-org-table.el: Use `should-error' instead of
  `condition-case' as that is what ERT provides for these sort of
  tests.
2015-01-25 11:20:36 +01:00
Achim Gratz 6b24ffdad9 compatibility fixes for fda70440f4
* 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.
2015-01-25 11:20:31 +01:00
Nicolas Goaziou b6fce5c90b ox: Prune parse tree before calling tree filter
* 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>
2015-01-23 23:59:23 +01:00
Aaron Ecay fa5fd63516 babel: fix up org-babel-script-escape
* 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.
2015-01-23 14:36:40 -05:00
Nicolas Goaziou a9e4636cbf test-org-src: Fix failing tests
* testing/lisp/test-org-src.el (test-org-src/basic,
  test-org-src/empty-block): Do not rely on `word-at-point'.
2015-01-23 00:24:29 +01:00
Aaron Ecay fda70440f4 test: Fixes for running tests interactively.
* 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.
2015-01-22 01:52:49 -05:00
Nicolas Goaziou 6b450ce81c ox: Remove `org-export-ignore-element'
* 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'.
2015-01-22 00:11:35 +01:00
Nicolas Goaziou ec0706ea40 macro: Implement argument extracting and escaping functions
* lisp/org-macro.el (org-macro-escape-arguments,
  org-macro-extract-arguments): New functions.

* lisp/org-element.el (org-element-macro-parser): Use new function.

* testing/lisp/test-org-macro.el (test-org-macro/escape-arguments,
  test-org-macro/extract-arguments): New tests.
2015-01-21 00:27:24 +01:00
Nicolas Goaziou fdb0092830 ob-core: Refactor `org-babel-where-is-src-block-head'
* lisp/ob-core.el (org-babel-where-is-src-block-head): Refactor.  In
  particular, do not return a marker, ever.  Also update docstring.
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-org):
  Fix tests containing invalid Org syntax.
2015-01-13 17:16:45 +01:00