Commit Graph

289 Commits

Author SHA1 Message Date
Nicolas Goaziou 09164e5c72 org-export: Hide select tags
* contrib/lisp/org-export.el (org-export-get-tags): New function.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title): Use new function.
* contrib/lisp/org-e-html.el (org-e-html-format-headline--wrap,
  org-e-html-headline): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-headline,
  org-e-latex-inlinetask): Use new function.
* contrib/lisp/org-e-odt.el (org-e-odt-format-headline--wrap): Use new
  function.
* testing/lisp/test-org-export.el: Add tests.
2012-05-26 13:52:03 +02:00
Nicolas Goaziou 68744bf19f org-export: Fix selective export when a select tag is present
* contrib/lisp/org-export.el (org-export-populate-ignore-list): Fix
  docstring.
(org-export--selected-trees): Correctly search for headlines with
a select tag.
(org-export--skip-p): Fix selective export when a select tag is
present in the buffer.
* testing/lisp/test-org-export.el: Update tests.
2012-05-26 13:51:55 +02:00
Nicolas Goaziou 42f7ba0d02 org-element: Fix ill-defined keywords parsing
* contrib/lisp/org-element.el (org-element-comment-parser):
  Ill-defined keywords (without the colons) are treated as comments.
(org-element-comment-interpreter): Apply changes to lexer.
* testing/lisp/test-org-element.el: Add test.
2012-05-20 17:33:36 +02:00
Nicolas Goaziou c91bcb368f org-export: Fix macro expansion when back-end protects dollar signs
* contrib/lisp/org-export.el (org-export-get-inbuffer-options): Return
  an "eval" macro as a regular secondary string instead of a plain
  string.
(org-export-expand-macro): Replace arguments before exporting
them (and possibly protecting dollar signs).  Refactor code.
* testing/lisp/test-org-export.el: Add tests.
2012-05-20 12:18:16 +02:00
Nicolas Goaziou 51472b4d33 org-export: Implement `org-export-resolve-radio-link'
* contrib/lisp/org-export.el (org-export-resolve-coderef): New function.
* contrib/lisp/org-e-ascii.el (org-e-ascii-link): Use new function.
* contrib/lisp/org-e-html.el (org-e-html-link): Use new function.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Use new function.
* contrib/lisp/org-e-odt.el (org-e-odt-link): Use new function.
* testing/lisp/test-org-export.el: Add tests.
2012-05-18 11:42:16 +02:00
Nicolas Goaziou 7421e96536 org-export: Remove naming convening for back-ends
* contrib/lisp/org-e-ascii.el (org-e-ascii-translate-alist): New variable.
* contrib/lisp/org-e-html.el (org-e-html-translate-alist): New
  variable.
(org-e-html-filters-alist): Move variable into an appropriate section.
* contrib/lisp/org-e-latex.el (org-e-latex-translate-alist): New variable.
* contrib/lisp/org-e-odt.el (org-e-odt-translate-alist): New variable.
(org-e-odt-option-alist): Move variable into an appropriate section.
* contrib/lisp/org-export.el (org-export-transcoder): Retrieve
  translators from `org-BACKEND-translate-alist' instead of applying
  a naming convention to each of them.
* testing/lisp/test-org-export.el: Update tests.
2012-05-18 11:42:15 +02:00
Nicolas Goaziou 5750f0869c org-element: Preserve visibility when moving elements
* contrib/lisp/org-element.el (org-element-swap-A-B): Preserve
  visibility when moving elements.
* testing/lisp/test-org-element.el: Add tests.
2012-05-11 16:07:11 +02:00
Nicolas Goaziou d71464c0d3 org-element: Handle multiple TBLFM keywords
* contrib/lisp/org-element.el (org-element-table-parser,
  org-element-table-interpreter): Handle multiple TBLFM keywords.
(org-element-collect-affiliated-keywords): Minor changes to
docstring.
* testing/lisp/test-org-element.el: Add test.
2012-05-11 15:17:14 +02:00
Nicolas Goaziou d308ea3172 org-element: Fix latex environment parsing
* 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.
2012-05-10 23:05:42 +02:00
Nicolas Goaziou 56520a6936 Merge branch 'maint' 2012-05-09 23:34:05 +02:00
Nicolas Goaziou 0ebeb77a1a org-list: Add visibility tests
* testing/lisp/test-org-list.el: Add tests.
2012-05-09 23:33:17 +02:00
Nicolas Goaziou c2aac5f195 org-element: Add tests
* testing/lisp/test-org-element.el: Add tests.
2012-05-06 12:15:39 +02:00
Nicolas Goaziou e4c2540b68 org-element: Add a function to fill an element
* contrib/lisp/org-element.el (org-element-fill-paragraph): New function.
* testing/lisp/test-org-element.el: Add tests.
2012-05-05 17:43:42 +02:00
Nicolas Goaziou 88032eed64 org-element: `org-element-map' applies to strings and secondary strings
* 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.
2012-05-05 17:43:42 +02:00
Nicolas Goaziou ed9a748057 org-element: Refactor navigation tools
* 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.
2012-05-05 09:15:33 +02:00
Nicolas Goaziou b137cdb296 org-element: Fix to footnote-definition parsing
* 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.
2012-05-05 09:15:33 +02:00
Nicolas Goaziou d83ab52626 org-element: Refactor code, add tests
* 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.
2012-05-05 09:15:33 +02:00
Nicolas Goaziou 01d83dc1f4 org-export: Fix table export bug with cells made of only one object
* 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.
2012-05-03 14:29:30 +02:00
Nicolas Goaziou f4791557e2 org-element: Store fixed-with and comment contents without markers
* contrib/lisp/org-element.el (org-element-comment-parser): Store
  comments without leading hash and maybe plus sign.
(org-element-fixed-width-parser): Store fixed-width contents without
leading colons.
(org-element-comment-interpreter,
org-element-fixed-width-interpreter): Apply changes.
* contrib/lisp/org-e-odt.el (org-e-odt-fixed-width): Apply changes to
  fixed-width `:value' property.
* contrib/lisp/org-e-latex.el (org-e-latex-fixed-width): Apply changes
  to fixed-width `:value' property.
* contrib/lisp/org-e-html.el (org-e-html-fixed-width): Apply changes
  to fixed-width `:value' property.
* contrib/lisp/org-e-ascii.el (org-e-ascii-fixed-width): Apply changes
  to fixed-width `:value' property.
* testing/lisp/test-org-element.el: Add tests.
2012-05-02 17:25:30 +02:00
Nicolas Goaziou 172d7a6f5e org-element: Apply `org-translate-link' when parsing a link
* contrib/lisp/org-element.el (org-element-link-parser): Apply
  `org-translate-link' when parsing a link.
* testing/lisp/test-org-element.el: Add test.
2012-05-01 15:47:14 +02:00
Nicolas Goaziou 32a5920e69 org-element: Internally store headline/inlinetask's tags as a list of strings
* 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.
2012-05-01 14:29:40 +02:00
Nicolas Goaziou 2ab6367daf org-element: Interpret correctly switches in example blocks
* contrib/lisp/org-element.el (org-element-example-block-interpreter):
  Interpret correctly switches in example blocks.
* testing/lisp/test-org-element.el: Add test.
2012-04-30 23:44:30 +02:00
Nicolas Goaziou 15315c5cc6 org-element: Fix src-block switches parsing
* contrib/lisp/org-element.el (org-element-src-block-parser): Fix
  switches parsing.
* testing/lisp/test-org-element.el: Add test.
2012-04-30 18:21:35 +02:00
Nicolas Goaziou 99a5d6bea8 org-element: Small fix to previous commit
* contrib/lisp/org-element.el (org-element-export-snippet-parser):
  Small fix.
* testing/lisp/test-org-export.el: Fix test.
2012-04-30 17:49:55 +02:00
Nicolas Goaziou 803d76825a org-element: Change to export-snippet syntax
* 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>>
2012-04-30 17:34:01 +02:00
Nicolas Goaziou bea597be96 org-export: Add `active' and `inactive' alternatives to `org-export-with-timestamps'
* 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.
2012-04-29 22:55:37 +02:00
Nicolas Goaziou 941f90a649 org-export: Export `clock' and `planning' elements
* contrib/lisp/org-export.el (org-export-option-alist): Add new
  filters.
(org-export-with-clocks, org-export-with-planning,
org-export-filter-clock-functions,
org-export-filter-planning-functions): New variables.
(org-export--skip-p): Skip `clock' and `planning' types depending on
export options.
* contrib/lisp/org-e-ascii.el (org-e-ascii-clock,
  org-e-ascii-planning): New functions.
(org-e-ascii-time-stamp): Update function.  Use `org-translate-time'.
* contrib/lisp/org-e-html.el (org-e-html-clock, org-e-html-planning):
  New functions.
(org-e-html-time-stamp): Update function.
* contrib/lisp/org-e-latex.el (org-e-latex-clock,
  org-e-latex-planning): New functions.
(org-e-latex-time-stamp): Update function.  Use `org-translate-time'.
* contrib/lisp/org-e-odt.el (org-e-odt-clock, org-e-odt-planning): New
  functions.
(org-e-odt-time-stamp): Update function.  Use `org-translate-time'.
* testing/lisp/test-org-export.el: Add tests.
2012-04-29 02:26:33 +02:00
Nicolas Goaziou 5cd9c01757 org-element: Add `clock' and `planning' element types
* 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.
2012-04-29 02:26:33 +02:00
Nicolas Goaziou fd5f561a3e org-element: Fix block parsing
* contrib/lisp/org-element.el (org-element-current-element): Fix
  regexp for block boundaries.
* testing/lisp/test-org-element.el (test-org-element/block-switches):
  Fix test.
2012-04-28 21:12:30 +02:00
Nicolas Goaziou b21b6ead24 org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
  renamed from `org-e-html-emphasis-alist'.  Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
  Variable renamed from `org-e-latex-emphasis-alist'.  Change value
  type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
  org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
  New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
  for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 18:00:50 +02:00
Nicolas Goaziou 312e225685 org-export: Remove unnecessary back-end arguments
* 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.
2012-04-28 11:41:15 +02:00
Nicolas Goaziou b3e8a8d437 org-export: Run a hook before parsing
* contrib/lisp/org-export.el (org-export-before-parsing-hook): New
  variable.
(org-export-as): Run `org-export-before-parsing-hook'.
* testing/lisp/test-org-export.el: Add test.
2012-04-28 09:35:12 +02:00
Nicolas Goaziou 41b2a2e766 org-element: Add tests 2012-04-27 19:02:02 +02:00
Nicolas Goaziou c6dc6e3d32 org-element: Verse blocks now contain objects
* contrib/lisp/org-element.el (org-element-verse-block-parser): Verse
  blocks now contain objects.
(org-element-verse-block-interpreter, org-element-current-element):
Apply changes to verse blocks.
(org-element-secondary-value-alist): Remove verse blocks from elements
with a secondary string.
* contrib/lisp/org-e-odt.el (org-e-odt-verse-block): Apply changes to
  verse blocks.
* contrib/lisp/org-e-latex.el (org-e-latex-verse-block): Apply changes
  to verse blocks.
* contrib/lisp/org-e-html.el (org-e-html-verse-block): Apply changes
  to verse blocks.
* contrib/lisp/org-e-ascii.el (org-e-ascii-verse-block): Apply changes
  to verse blocks.
* testing/lisp/test-org-element.el: Add tests.
2012-04-26 14:49:29 +02:00
Nicolas Goaziou 206ce6e0b5 org-element: Ignore blank lines when removing element indentation
* contrib/lisp/org-element.el (org-element-normalize-contents): Ignore
  blank and empty lines when removing element indentation.
* testing/lisp/test-org-element.el: Add tests.
2012-04-26 14:49:29 +02:00
Nicolas Goaziou 172ae310a8 org-export: Define tools for tables, table rows and table cells
* contrib/lisp/org-export.el (org-export-table-cell-width,
  org-export-table-cell-alignment, org-export-table-cell-borders,
  org-export-table-row-group, org-export-table-has-special-column-p,
  org-export-table-row-is-special-p, org-export-get-parent-table,
  org-export-table-dimensions, org-export-table-cell-address,
  org-export-get-table-cell-at, org-export-table-has-header-p,
  org-export-table-cell-starts-colgroup-p,
  org-export-table-cell-ends-colgroup-p,
  org-export-table-row-starts-rowgroup-p,
  org-export-table-row-ends-rowgroup-p,
  org-export-table-row-starts-header-p,
  org-export-table-row-ends-header-p): New functions.
(org-export-table-format-info, org-export-clean-table): Removed
functions.
(org-export-filter-table-cell-functions,
org-export-filter-table-row-functions): New variables.
(org-export-filters-alist): Install new filters.
(org-export-collect-tree-properties, org-export--skip-p): Mark special
rows and cells as ignored.
* testing/lisp/test-org-export.el: Add tests.
2012-04-22 19:41:45 +05:30
Nicolas Goaziou eeeee5f1da org-element: Split tables into table-row elements and table-cell objects
* 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.
2012-04-22 19:41:28 +05:30
Nicolas Goaziou 97b0696212 org-list: Fix bugs relative to item indentation
* 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.
2012-04-21 12:13:49 +02:00
Bastien Guerry b857974f7d Small reformatting of testing/README. 2012-04-21 00:59:14 +02:00
Nicolas Goaziou dbc6fd1ebf Merge branch 'hotfix' 2012-04-18 13:02:09 +02:00
Nicolas Goaziou 7d6309f132 org-list: Fix bugs relative to item indentation
* 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.
2012-04-18 13:01:44 +02:00
Eric Schulte 5e4cffbb06 code-block languages may specify their own headers and values
* lisp/ob-R.el (org-babel-header-args:R): Adding values.
* lisp/ob-clojure.el (org-babel-header-args:clojure): Adding values.
* lisp/ob-lisp.el (org-babel-header-args:lisp): Adding values.
* lisp/ob-sql.el (org-babel-header-args:sql): Adding values.
* lisp/ob-sqlite.el (org-babel-header-args:sqlite): Adding values.
* lisp/ob.el (org-babel-combine-header-arg-lists): Combine lists of
  arguments and values.
  (org-babel-insert-header-arg): Use new combined header argument
  lists.
  (org-babel-header-arg-expand): Add support for completing-read
  insertion of header arguments after ":"
  (org-babel-enter-header-arg-w-completion): Completing read insertion
  of header arguments
  (org-tab-first-hook): Adding header argument completion.
  (org-babel-params-from-properties): Combining header argument lists.
* testing/lisp/test-ob.el (ob-test/org-babel-combine-header-arg-lists):
  Test the new header argument combination functionality.
2012-04-13 08:43:16 -04:00
Nicolas Goaziou 36711b05ba org-export: Fix footnotes export outside parsing scope
* 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.
2012-04-13 15:47:13 +02:00
Nicolas Goaziou 97d2db4867 org-element: Fix interpretation of affiliated keywords
* 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.
2012-04-10 23:53:11 +02:00
Nicolas Goaziou d6faea24d4 org-footnote: Fix bug related to sorting and folded view
* 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.
2012-04-08 12:01:57 +02:00
Nicolas Goaziou 8453ac1bf3 org-element: Remove dependency on org-footnote predicates
* 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.
2012-04-06 23:50:00 +02:00
Nicolas Goaziou 4019559ee2 org-footnote: Don't grab trailing blank lines in a footnote definition
* lisp/org-footnote.el (org-footnote-at-definition-p): Don't grab
  trailing blank lines in a footnote definition.
(org-footnote-delete-definitions): Remove both footnote definition and
trailing blank lines.
* testing/lisp/test-org-export.el (test-org-export/fuzzy-links): Fix
  a docstring.
* contrib/lisp/org-element.el (org-element-footnote-definition-parser):
  Apply change to footnote definitions.
2012-04-06 19:14:51 +02:00
Eric Schulte 8d43aa2aa9 test the new file-desc header argument
* testing/lisp/test-ob.el (test-ob/file-desc-header-argument): Test
  the new file-desc header argument.
2012-03-31 15:00:35 -04:00
Ilya Shlyakhter 1977df99a4 Testing: Corrected the command to run batch tests given in README
testing/README (running batch tests): Added missing paths to the command.
   Make sure to load the org-mode code from the git checkout rather than
   whatever Org is installed in Emacs directories.

TINYCHANGE
2012-03-31 10:29:16 +02:00
Nicolas Goaziou 82281bcc94 org-element: Fix bug with `greater-element' granularity
* 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.
2012-03-28 17:29:14 +02:00