Commit Graph

306 Commits

Author SHA1 Message Date
Nicolas Goaziou 6e73c22d15 org-export: Fix commit 468d860528
* contrib/lisp/org-export.el (org-export-dispatch-ui): Ensure fitting
  happens once contents have been inserted in the displayed buffer.
2012-10-22 23:56:26 +02:00
Nicolas Goaziou 9751dc4561 org-export: Use relative path for target filenames
* contrib/lisp/org-export.el (org-export-output-file-name): Use
  relative path for target filenames.
2012-10-22 20:58:27 +02:00
Nicolas Goaziou 468d860528 org-export: Make sure that window displaying UI is tall enough
* contrib/lisp/org-export.el (org-export-dispatch-ui): Make sure that
  window displaying UI is tall enough. This fixes a bug where only
  a part of the menu was displayed.
2012-10-21 14:54:23 +02:00
Nicolas Goaziou 9497098dd4 org-export: Don't modify inlinetasks stars when including a file
* contrib/lisp/org-export.el (org-export--prepare-file-contents):
  Don't modify inlinetasks stars when including a file.
2012-10-16 22:00:39 +02:00
Nicolas Goaziou c1c0c70c89 org-export: Add tag inheritance to `org-export-get-tags'
* contrib/lisp/org-export.el (org-export-get-tags): Add optional tag
  inheritance.
* testing/lisp/test-org-export.el: Add test.
2012-10-14 13:19:12 +02:00
Nicolas Goaziou 0a99cf7249 org-export: Tweak dispatch UI
* contrib/lisp/org-export.el (org-export-dispatch-use-expert-ui):
  Complete docstring.
(org-export-dispatch): Fix docstring. Clean dispatch buffer, if any,
each time the function is called.
(org-export-dispatch-ui): Make sure window containing dispatch buffer
is active when user is prompted for a key.  Also remove cursor from
view.
(org-export-dispatch-action): Ring a bell when a wrong key is pressed.
In regular UI, also inform the user by a message.
2012-10-11 21:32:21 +02:00
Nicolas Goaziou b6822edce3 org-export: Update radio targets after expanding include keywords
* contrib/lisp/org-export.el (org-export-as): Update radio targets
  after expanding include keywords.
2012-10-10 13:55:51 +02:00
Nicolas Goaziou 89d6a26f8d org-export: Expand include keywords before macros
* contrib/lisp/org-export.el (org-export-as): Expand include keywords
  before macros.  This allows to specify macro templates in the
  included file.
* testing/examples/macro-templates.org: New file for testing purposes.
* testing/lisp/test-org-export.el: Add test.
2012-10-10 13:52:54 +02:00
Achim Gratz 424a1c5d2f correct reference to non-existing source file
* contrib/lisp/org-export.el: Correct reference to non-existing source
  file, org-exp-blocks has been removed and the imported function is
  now in ob-exp.
2012-10-07 19:16:20 +02:00
Nicolas Goaziou 956858a395 org-export: Fix menu leak when reloading Org
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Make sure a given entry won't be
  added to menu more than once.
2012-10-06 22:04:27 +02:00
Nicolas Goaziou 58b42debb1 org-export: Include title, author, date and email macros
* contrib/lisp/org-export.el (org-export-expand-macro): New function.
(org-export-as): Use new function.
* lisp/org.el (org-macro-expand, org-macro-replace-all): Change
  signature.  The function now accepts an alist of templates so it
  doesn't have to rely only on `org-macro-templates'.
(org-macro-initialize-templates): {{{date}}} is not anymore an alias
for {{{time}}}.  During export, it will provide the value stored in
DATE keyword instead.
* testing/lisp/test-org-export.el: Add tests.
* testing/lisp/test-org.el: Update tests.
2012-10-06 10:29:37 +02:00
Nicolas Goaziou 0af2f6068f org-export: Fix comma escape in included files
* contrib/lisp/org-export.el (org-export-expand-include-keyword): Use
  new functions to comma escape contents of included files when in an
  example or a src block.
2012-10-06 09:19:41 +02:00
Nicolas Goaziou e4799ef25e org-export: Remove unused function declarations 2012-10-04 14:42:51 +02:00
Nicolas Goaziou 2a95a47c5f Merge branch 'maint' 2012-10-01 21:37:48 +02:00
Nicolas Goaziou 3bd22fb045 org-element: Store value of example-blocks and src-blocks unescaped
* lisp/org-element.el (org-element-example-block-parser,
  org-element-src-block-parser): Store value of example-blocks and
  src-blocks unescaped.
(org-element-example-block-interpreter,
org-element-src-block-interpreter): Escape value again when storing
it.
* contrib/lisp/org-export.el (org-export-unravel-code): Don't clean
  commas from code since org-element already took care of it.
* testing/lisp/test-org-export.el: Update test.
* testing/lisp/test-org-element.el: Add tests.
2012-10-01 21:35:50 +02:00
Nicolas Goaziou e74523905b org-element: Distinguish parsed affiliated keywords from document properties
* lisp/org-element.el (org-element-parsed-keywords): Remove document
  properties from the value.
(org-element-dual-keywords): Fix docstring.
(org-element-document-properties): New variable
* contrib/lisp/org-export.el (org-export--get-subtree-options,
  org-export--get-inbuffer-options, org-export--get-global-options):
  Use new variable instead of parsed keywords.
2012-09-30 23:57:45 +02:00
Nicolas Goaziou e189be5720 org-export: Small refactoring
* contrib/lisp/org-export.el (org-export--get-buffer-attributes):
  Small refactoring.
2012-09-30 14:03:37 +02:00
Nicolas Goaziou 179a5224f6 org-export: Signal an error when back-end isn't registered
* contrib/lisp/org-export.el (org-export-barf-if-invalid-backend): New
  function.
(org-export-as): Signal an error when back-end isn't registered.
2012-09-24 22:35:55 +02:00
Nicolas Goaziou 9ebf47afbf org-export: Re-order filter variables 2012-09-24 08:30:46 +02:00
Nicolas Goaziou ddfaa6fe7a org-export: Add filters for new element type
* contrib/lisp/org-export.el (org-export-filter-node-property-functions):
  New variable.
(org-export-filters-alist): Use new variable.
2012-09-23 22:50:33 +02:00
Nicolas Goaziou 66fe322120 org-export: New function to return a node property, even inherited
* contrib/lisp/org-export.el (org-export-get-node-property): New
  function.
* testing/lisp/test-org-export.el: Add tests.
2012-09-23 19:37:21 +02:00
Nicolas Goaziou baed7dc7db org-element: Optimize affiliated keywords parsing
* lisp/org-element.el (org-element-center-block-parser,
  org-element-drawer-parser, org-element-dynamic-block-parser,
  org-element-footnote-definition-parser,
  org-element-plain-list-parser, org-element-quote-block-parser,
  org-element-special-block-parser, org-element-babel-call-parser,
  org-element-comment-parser, org-element-comment-block-parser,
  org-element-example-block-parser, org-element-export-block-parser,
  org-element-fixed-width-parser, org-element-horizontal-rule-parser,
  org-element-keyword-parser, org-element-latex-environment-parser,
  org-element-paragraph-parser, org-element-property-drawer-parser,
  org-element-src-block-parser, org-element-table-parser,
  org-element-verse-block-parser): Change signature. Now use an
  additional argument: affiliated.
(org-element--current-element): Skip affiliated keywords and pass them
  as an argument to parsers.  It prevents to walk through these
  keywords twice: the first time to get to the first line of the
  element, and a second time to collect the affiliated keywords.
* contrib/lisp/org-export.el (org-export-get-caption): Update function
  since multiple affiliated keywords are now reversed.
* testing/lisp/test-org-element.el: Update tests.
2012-09-20 20:08:16 +02:00
Nicolas Goaziou f0bcf780a3 org-export: Fix collision between old export menu and new one
* contrib/lisp/org-export.el (org-export-dispatch-ui): Do not use same
  buffer name as previous export dispatcher.  Also make sure the
  temporary buffer is deleted once the export is done.
2012-09-14 13:54:43 +02:00
Nicolas Goaziou cedf5190e5 org-export: Update code comments 2012-09-13 21:01:10 +02:00
Nicolas Goaziou fe140488aa org-element: Allow multiple caption keywords
* lisp/org-element.el (org-element-multiple-keywords): Allow multiple
  caption keywords.
* contrib/lisp/org-export.el (org-export-get-caption): New function.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-org-export.el: Add tests.
2012-09-13 17:33:46 +02:00
Nicolas Goaziou faa2be8d57 org-export: Don't overwrite menus or add redundant entries
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Don't overwrite menus or add
  redundant entries.
2012-09-09 15:39:28 +02:00
Nicolas Goaziou 113ca8767a org-export: Define new interface for `org-export-dispatch'
* contrib/lisp/org-export.el (org-export-define-backend):
  Add :menu-entry keyword.
(org-export-define-derived-backend): Add :menu-entry
and :sub-menu-entry keywords.
(org-export-dispatch-menu-entries): New variable.
(org-export-dispatch): Define a new interface.
(org-export-dispatch-ui): Rewrite function.
(org-export-dispatch-action): New function.

Every back-end defined through `org-export-define-backend' or
`org-export-define-derived-backend' can specify a menu entry for
`org-export-dispatch'. Navigating the menu is now a two levels
process.
2012-09-09 13:13:57 +02:00
Jambunathan K c276eeebee org-export.el: Revert an erroneous commit, sigh 2012-09-05 03:33:16 +05:30
Jambunathan K 272c5fb74f org-e-freemind.el: Reverted accidental commit 2012-09-05 03:25:50 +05:30
Jambunathan K 8ff4ea03b0 org-export.el (org-export-dispatch): Open ODT files with system app 2012-09-03 19:19:28 +05:30
Nicolas Goaziou 7ce732b294 org-export: Make BIND keywords case insensitive
* contrib/lisp/org-export.el (org-export--install-letbind-maybe): Make
  BIND keywords case insensitive.
* testing/lisp/test-org-export.el: Add test.
2012-09-01 14:21:09 +02:00
Nicolas Goaziou 57da184a5c org-export: Allow in-buffer keywords at any column
* contrib/lisp/org-export.el (org-export--get-inbuffer-options): Allow
  in-buffer keywords at any column.

`org-make-options-regexp' enforces keywords at column 0. This is an
unnecessary restriction, as we can imagine the following Org buffer:

* Export Setup              :noexport:

  #+AUTHOR: Me
  #+DATE: 29/03/2012

* Headline 1

  ...
2012-09-01 13:04:14 +02:00
Nicolas Goaziou 61ad50d758 org-export: Fix #+BIND: keywords evaluation
* contrib/lisp/org-export.el (org-export--install-letbind-maybe): If
  a variable is bound two times in the buffer, be sure to set its
  value to the last bound. Use correct function to confirm binding.
  Allow keyword to start on any column.
* testing/lisp/test-org-export.el: Add tests.
2012-09-01 12:59:57 +02:00
Nicolas Goaziou ea77b2ccb2 org-export: Use new API for macro expansion
* contrib/lisp/org-export.el (org-export-define-backend): Update
  docstring.
(org-export-special-keywords): Remove "MACRO".
(org-export--get-inbuffer-options, org-export--get-buffer-attributes):
Remove internal macro handling.
(org-export-as): Use external tool instead.
(org-export-expand-macro): Remove function.
* contrib/lisp/org-e-ascii.el (org-e-ascii-macro): Remove function.
* contrib/lisp/org-e-groff.el (org-e-groff-macro): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-macro): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-macro): Remove function.
* contrib/lisp/org-e-man.el (org-e-man-macro): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-macro): Remove function.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-macro): Remove
  function.
* testing/lisp/test-org-export.el: Remove tests.

Since macros are now expanded before parsing (and produce Org syntax),
back-ends will never see them (unless NO-EXPAND argument from
`org-export-as' is non-nil, which isn't the case for any back-end so
far).
2012-09-01 10:56:00 +02:00
Nicolas Goaziou caf2432c52 org-export: Add an option to toggle export of stat cookies
* contrib/lisp/org-export.el (org-export-with-statistics-cookies): New
  variable.
(org-export-options-alist): Use new variable.
(org-export--skip-p): Handle new option.
* testing/lisp/test-org-export.el: Add test.
2012-08-27 15:27:02 +02:00
Nicolas Goaziou 9f2824852c org-export: Objects in secondary strings can also be ignored
* contrib/lisp/org-export.el (org-export--populate-ignore-list): Move
  into secondary strings when looking for objects to ignore in the
  parse tree.
2012-08-27 15:27:02 +02:00
Nicolas Goaziou 86b1be57b9 org-export: Handle "\-" as a special string
* contrib/lisp/org-export.el (org-export-with-special-strings): Fix
  docstring.
* contrib/lisp/org-e-ascii.el (org-e-ascii-plain-text): Remove soft
  hyphens.
* contrib/lisp/org-e-latex.el (org-e-latex-plain-text): Handle soft
  hyphens.
2012-08-27 14:35:54 +02:00
Nicolas Goaziou 4d789f4c30 org-export: Fix filters returning a nil value
* contrib/lisp/org-export.el (org-export-filter-apply-functions): If
  a filter returns nil, return last non-nil value.
2012-08-27 14:35:54 +02:00
Nicolas Goaziou 61b5e28509 org-export: Flesh out dictionary
* contrib/lisp/org-export.el (org-export-dictionary): Flesh out
  dictionary.
(org-export-translate): Allow for a :default charset in order to
simplify dictionary completion.
2012-08-25 14:07:41 +02:00
Nicolas Goaziou 7e466ea883 org-export: Small clean-up 2012-08-24 10:44:05 +02:00
Nicolas Goaziou 095f9322e5 org-export: Make sure back-end specific filters do not make any back-end check
* contrib/lisp/org-e-ascii.el (org-e-ascii-filter-headline-blank-lines):
  Remove backend check.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-filter-section-blank-lines):
  Remove backend check.
* contrib/lisp/org-export.el (org-export-define-backend): Update
  docstring accordingly.
2012-08-24 10:41:41 +02:00
Nicolas Goaziou cced6735a7 org-export: Run export hook with current back-end as argument
* contrib/lisp/org-export.el (org-export-as): Run export hook with
  current back-end as argument.
* testing/lisp/test-org-export.el: Update test.
2012-08-24 10:10:44 +02:00
Nicolas Goaziou cc839259a4 org-export: Nil value from a filter means filter will be skipped
* contrib/lisp/org-export.el (org-export-filter-apply-functions): Nil
  value from a filter means filter will be skipped. To ignore the
  current element or object, the filter has to return the empty string
  instead.

This change is done to ease filter writing. When writing
a backend-specific filter (and I guess most are), there's no more need
for the somewhat contrived:

  (if (not (eq backend 'e-latex)) data
    ... filter's job...)

A more straightforward:

  (when (eq backend 'e-latex)
    ... filter's job...)

is now enough.

On the other hand, it is not possible anymore to specify 'ignore as
a filter to ignore every element or object of a given type. To
achieve that goal, one can now write, for example:

  (add-to-list 'org-export-filter-example-block-functions
                 (lambda (value backend info)
                   (when (eq backend 'e-html) "")))

It will ignore every example block in the `e-html' export back-end.
2012-08-24 09:56:48 +02:00
Nicolas Goaziou 3f40057adc org-export: Limit depth of headline collection to headline level
* contrib/lisp/org-export.el (org-export-collect-headlines): By
  default, limit depth of headline collection to last headline level.
* contrib/lisp/org-e-html.el (org-e-html-toc): Small refactoring.
2012-08-24 09:36:18 +02:00
Nicolas Goaziou f9e5600f82 org-export: Fix reference to a free variable in macros
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Fix reference to a free variable
  in macro.
2012-08-23 11:03:09 +02:00
Nicolas Goaziou fc6b9f1d88 org-export: Fix code comments 2012-08-20 10:25:05 +02:00
Nicolas Goaziou 952d722dcd org-export: Allow to toggle inlinetasks inclusion in export output
* contrib/lisp/org-export.el (org-export-options-alist,
  org-export--skip-p): Allow to toggle inlinetask inclusion in export.
(org-export-headline-levels, org-export-with-priority): Fix docstring.
(org-export-with-inlinetasks): New variable.
* testing/lisp/test-org-export.el: Add tests.
2012-08-16 12:46:49 +02:00
Achim Gratz a089a3bccc add autload cookie for org-export-dispatch
* contrib/lisp/org-export.el: Add autload cookie for org-export-dispatch.
2012-08-09 18:25:45 +02:00
Nicolas Goaziou 5057ae0fc2 org-export: Require info argument in some topology functions
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p, org-export-get-previous-element,
  org-export-get-next-element): Add INFO argument.  This is necessary
  to ignore non-exportable elements or objects.
(org-export--skip-p): Apply signature change.
* testing/lisp/test-org-export.el: Add tests.
* contrib/lisp/org-e-odt.el (org-e-odt-footnote-reference): Apply
  signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-headline, org-e-latex-table-cell): Apply signature
  change.
* contrib/lisp/org-e-html.el (org-e-html-footnote-reference,
  org-e-html-headline): Apply signature change.
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-snippet,
  org-e-beamer--format-block): Apply signature change.
2012-07-27 16:16:04 +02:00
Nicolas Goaziou c8acf8d695 org-export and back-ends: Fix some docstrings 2012-07-26 15:33:27 +02:00
Nicolas Goaziou 8d98835a3c org-export: Export properties from subtrees are case insensitive
* contrib/lisp/org-export.el (org-export--get-subtree-options): Export
  properties from subtrees are case insensitive.
2012-07-25 10:13:09 +02:00
Nicolas Goaziou 2b6ba84ad6 org-export: Memoize results from `org-export-data'
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Initialize hash table for memoization.
(org-export-data): Memoize results.
2012-07-24 22:52:29 +02:00
Nicolas Goaziou dbea7e658f org-export: Rename some internal functions
* contrib/lisp/org-export.el (org-export-get-environment,
  org-export-collect-tree-properties, org-export-data,
  org-export-expand-include-keyword): Use new names.
(org-export--parse-option-keyword): Renamed from
`org-export-parse-option-keyword'.
(org-export--get-subtree-options): Renamed from
`org-export-get-subtree-options'.
(org-export--get-inbuffer-options): Renamed from
`org-export-get-inbuffer-options'.
(org-export--get-buffer-attributes): Renamed from
`org-export-get-buffer-attributes'.
(org-export--get-global-options): Renamed from
`org-export-get-global-options'.
(org-export--allow-BIND-local): Renamed from
`org-export-allow-BIND-local'.
(org-export--confirm-letbind): Renamed from
`org-export-confirm-letbind'.
(org-export--install-letbind-maybe): Renamed from
`org-export-install-letbind-maybe'.
(org-export--get-min-level): Renamed from `org-export-get-min-level'.
(org-export--collect-headline-numbering): Renamed from
`org-export-collect-headline-numbering'.
(org-export--populate-ignore-list): Renamed from
`org-export-populate-ignore-list'.
(org-export--interpret-p): Renamed from `org-export--interpret-p'.
(org-export--prepare-file-contents): Renamed from
`org-export-prepare-file-contents'.
* contrib/lisp/org-e-publish.el (org-e-publish-find-date): Use new
  names.
* testing/lisp/test-org-export.el: Update tests.
2012-07-24 22:52:29 +02:00
Nicolas Goaziou b0f2e083b7 org-export: Update docstrings 2012-07-23 19:32:57 +02:00
Nicolas Goaziou 2b21bb4e52 export back-ends: Remove unused translators functions 2012-07-23 17:53:55 +02:00
Nicolas Goaziou a13a51e812 org-export: Add :export-block keyword to `org-export-define-derived-backend'
* contrib/lisp/org-export.el (org-export-define-derived-backend):
  Add :export-block keyword.  Also fix a generated doc-string.
* contrib/lisp/org-e-beamer.el: Use new keyword.
2012-07-23 14:19:51 +02:00
Nicolas Goaziou 6ea9d8c827 org-export: `org-export-define-backend': the standard way to create a back-end
* contrib/lisp/org-export.el (org-export-define-backend): New macro.
* contrib/lisp/org-e-ascii.el: Use new macro.
* contrib/lisp/org-e-html.el: Use new macro.
* contrib/lisp/org-e-latex.el: Use new macro.
* contrib/lisp/org-e-odt.el: Use new macro.
* contrib/lisp/org-element.el (org-element-block-name-alist): Remove
  hard-coded export block names from variable, since they are added
  automatically by `org-export-define-backend'.
* testing/lisp/test-org-element.el: Update test.
2012-07-23 14:12:14 +02:00
Nicolas Goaziou 611075db0b org-e-html: Remove an useless argument
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): Remove
  PUB-DIR, which doesn't make sense in that function.
* contrib/lisp/org-export.el: Apply change in function declaration.
2012-07-23 09:51:45 +02:00
Nicolas Goaziou 1b64d9582e org-export: Add optional argument to `org-export-read-attribute'
* contrib/lisp/org-export.el (org-export-read-attribute): Add optional
  argument to `org-export-read-attribute'.
* contrib/lisp/org-e-ascii.el (org-e-ascii-horizontal-rule): Use
  additional argument.
2012-07-21 15:12:08 +02:00
Nicolas Goaziou 86ff4cde98 org-export: Silence byte-compiler 2012-07-20 19:37:22 +02:00
Nicolas Goaziou 8478fac4a5 Add autoload and a commands to export to temporary buffer in export back-ends
* contrib/lisp/org-e-ascii.el (org-e-ascii-export-as-ascii): New
  function.
(org-e-ascii-export-to-ascii): Now autoloaded.
* contrib/lisp/org-e-latex.el (org-e-latex-export-as-latex): New
  function.
(org-e-latex-export-to-pdf): Now autoloaded.
(org-e-latex--collect-errors): Renamed from
`org-e-latex-collect-errors'.
(org-e-latex-compile): Apply renaming.
* contrib/lisp/org-e-html.el (org-e-html-export-as-html): New
  function.
(org-e-html-export-to-html): Fix docstring.
* contrib/lisp/org-export.el (org-export-dispatch): Use new functions.
2012-07-20 13:48:05 +02:00
Nicolas Goaziou 070e03011d org-element: Rename a few internal functions
* contrib/lisp/org-element.el (org-element--parse-elements): Renamed
  from `org-element-parse-elements'.
(org-element--parse-objects): Renamed from `org-element-parse-objects'.
(org-element--get-next-object-candidates): Renamed from
`org-element-get-next-object-candidates'.
(org-element--interpret-affiliated-keywords): Renamed from
`org-element-interpret--affiliated-keywords'.
(org-element--current-element): Renamed from
`org-element-current-element'.
(org-element--collect-affiliated-keywords): Renamed from
`org-element-collect-affiliated-keywords'.
(org-element-center-block-parser, org-element-drawer-parser,
org-element-dynamic-block-parser,
org-element-footnote-definition-parser, org-element-inlinetask-parser,
org-element-plain-list-parser, org-element-quote-block-parser,
org-element-special-block-parser, org-element-comment-parser,
org-element-comment-block-parser, org-element-example-block-parser,
org-element-export-block-parser, org-element-fixed-width-parser,
org-element-horizontal-rule-parser,
org-element-latex-environment-parser, org-element-paragraph-parser,
org-element-src-block-parser, org-element-table-parser,
org-element-verse-block-parser, org-element-fill-paragraph,
org-element-context, org-element-at-point, org-element-interpret-data,
org-element-parse-secondary-string, org-element-parse-buffer): Apply
name change.
* contrib/lisp/org-export.el (org-export-get-buffer-attributes): Apply
  name change.
* testing/lisp/test-org-element.el: Update tests accordingly.
* testing/lisp/test-org-export.el: Update tests accordingly.
2012-07-19 11:23:43 +02:00
Nicolas Goaziou 66767db56c org-export: Replace member with memq when possible
* contrib/lisp/org-element.el (org-element-set-element): Replace
  member with memq.
* contrib/lisp/org-export.el (org-export-get-min-level,
  org-export--skip-p, org-export-data, org-export-table-cell-width,
  org-export-table-cell-alignment): Replace member with memq.
2012-07-17 20:49:31 +02:00
Nicolas Goaziou 95cd07d058 org-export: Use `eq' instead of `equal' when possible
* contrib/lisp/org-export.el (org-export-data,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number, org-export-get-ordinal,
  org-export-get-loc, org-export-table-row-group,
  org-export-table-cell-starts-colgroup-p,
  org-export-table-cell-ends-colgroup-p,
  org-export-table-cell-address): Use `eq' instead of `equal' when
  possible.
* contrib/lisp/org-e-ascii.el (org-e-ascii-table-row):
* contrib/lisp/org-e-beamer.el (org-e-beamer-select-environment):
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
  org-e-html-latex-environment, org-e-html-paragraph): Use `eq'
  instead of `equal' when possible.
* contrib/lisp/org-e-latex.el (org-e-latex--get-footnote-counter):
* contrib/lisp/org-e-odt.el (org-e-odt-do-format-code,
  org-e-odt-footnote-def, org-e-odt-item, org-e-odt-latex-environment,
  org-e-odt-latex-fragment, org-e-odt-plain-list, org-e-odt-table,
  org-e-odt-enumerate-element): Use `eq' instead of `equal' when
  possible.

In particular, comparing elements shouldn't be done with `equal' since
they are circular lists.  On the other hand, using `eq' is fine if
they belong to the same tree.
2012-07-16 16:28:06 +02:00
Nicolas Goaziou 5a3617c6be org-export: Allow anonymous functions in translate alists
* contrib/lisp/org-export.el (org-export-transcoder, org-export-data):
  Allow anonymous functions in translate alists.
* testing/lisp/test-org-export.el: Update tests.
2012-07-15 21:29:38 +02:00
Nicolas Goaziou e6a88820bf org-export: Fix a docstring
* contrib/lisp/org-export.el (org-export-translate): Fix docstring.
2012-07-15 12:39:44 +02:00
Nicolas Goaziou 373cb5a37e org-export: Silence byte-compiler 2012-07-14 12:05:20 +02:00
Jambunathan K 22a6d99d5a org-export: Re-arrange entries in `org-export-dictionary'
* contrib/lisp/org-export.el (org-export-dictionary):
Re-arrange entries in ascending order.
2012-07-13 03:25:41 +05:30
Jambunathan K 936ff0703b org-export: Update org-export-dictionary
* contrib/lisp/org-export.el (org-export-dictionary): Add
follwing new entires - "Author", "Date", "Equation" and
"Figure".
2012-07-13 03:25:29 +05:30
Nicolas Goaziou 1216df61cc org-export: Implement multi-backend dictionary
* contrib/lisp/org-export.el (org-export-translate): New function.
(org-export-dictionary): New variable.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-toc,
  org-e-ascii--list-listings, org-e-ascii--list-tables,
  org-e-ascii-template, org-e-ascii--translate): Use new translation
  system.
(org-e-ascii-dictionary): Remove variable.
2012-07-12 13:31:06 +02:00
Nicolas Goaziou d5f5c77fcd org-export: Small refactoring
* contrib/lisp/org-export.el (org-export-get-previous-element,
  org-export-get-next-element): Small refactoring.
* testing/lisp/test-org-export.el: Add tests.
2012-07-10 19:22:04 +02:00
Nicolas Goaziou bb9a26389c org-element: Rename `org-export-set-element' into `org-element-set-element'
* contrib/lisp/org-element.el (org-element-set-element): New function.
* contrib/lisp/org-export.el (org-export-set-element): Removed function.
* testing/lisp/test-org-element.el: Add test.
* testing/lisp/test-org-export.el: Remove test.
2012-07-10 17:29:13 +02:00
Nicolas Goaziou 9028c4655f org-export: Improve a docstring
* contrib/lisp/org-export.el (org-export-get-genealogy): Improve
  docstring.
2012-07-10 15:30:51 +02:00
Nicolas Goaziou 0bbc9fa075 org-export: Accept nil :post-blank property
* contrib/lisp/org-export.el (org-export-data): Nil :post-blank
  property is equivalent to a value of 0.
2012-07-09 22:48:00 +02:00
Bastien Guerry 9731a8b681 Fix `org-export-creator-string' and add the option `org-e-html-creator-string'.
* org-e-html.el (org-e-html-creator-string): New option.
(org-e-html-options-alist): Use it.

* org-export.el (org-export-creator-string): Don't use HTML
tags in the generic creator string.

Thanks to Nicolas for directions on what to change wrt this.
2012-07-06 09:09:31 +02:00
Nicolas Goaziou b5eccf94df org-export: Fix docstrings 2012-07-05 23:42:09 +02:00
Bastien Guerry ec5cc394b4 org-export.el (org-export-filters-alist): Fix typo in docstring.
* org-export.el (org-export-filters-alist): Fix typo in docstring.
2012-07-05 18:06:14 +02:00
Bastien Guerry 820803ab95 Add links to Org mode and GNU Emacs websites in creator strings.
* org-html.el (org-export-as-html): Add links to the Org mode
and GNU Emacs websites When :html-postamble is set to 't.

* org-export.el (org-export-creator-string): Add links to the
Org mode and GNU Emacs websites.
2012-07-05 16:02:06 +02:00
Nicolas Goaziou 73951db845 org-export: Add a subtree property for each export option
* contrib/lisp/org-export.el (org-export-get-subtree-options): Add
  a subtree property for each export option.
* testing/lisp/test-org-export.el: Add tests.

Properties names are obtained by adding "EXPORT_" prefix to buffer
keywords.
2012-07-05 13:44:26 +02:00
Nicolas Goaziou e2cd9c398d org-export: Modify exclude tags and select tags keywords
* contrib/lisp/org-export.el (org-export-options-alist):
  EXPORT_EXCLUDE_TAGS (resp. EXPORT_SELECT_TAGS) becomes
  EXCLUDE_TAGS (resp. SELECT_TAGS).

EXPORT_ prefix is required for subtree properties relative to export.
Thus, this change avoids confusion.
2012-07-04 18:38:48 +02:00
Nicolas Goaziou c96431a2ea org-export: Small clean-up
* contrib/lisp/org-export.el (org-export-get-subtree-options): Small
  clean-up.
2012-07-04 18:00:31 +02:00
Nicolas Goaziou a69f4b88c1 org-export: Fix byte-compilation
* contrib/lisp/org-export.el (org-export-with-current-buffer-copy):
  Fix byte-compilation.
2012-07-02 11:56:17 +02:00
Nicolas Goaziou 0b89d5bcc6 org-export: Silence byte-compiler 2012-07-02 11:22:22 +02:00
Nicolas Goaziou ab82a9dcfe Update tests and comments for new snippet syntax
* contrib/lisp/org-export.el (org-export-snippet-translation-alist):
  Fix docstring.
(org-export-as): Fix code comment.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-export.el: Update tests.
2012-06-30 10:01:28 +02:00
Nicolas Goaziou bafe0fb295 org-export: Fix bug with default DATE value
* contrib/lisp/org-export.el (org-export-get-global-options): Parse
  default value from parsed keywords, too.
* testing/lisp/test-org-export.el: Change test accordingly.
2012-06-22 15:07:07 +02:00
Nicolas Goaziou 2900138774 org-export: Fix error when calling "l" from dispatcher
* contrib/lisp/org-export.el (org-export-dispatch): Fix error when
  calling "l" from dispatcher.
2012-06-18 11:49:12 +02:00
Nicolas Goaziou 04ad4ab417 org-export: Follow EXPORT_TITLE property when exporting subtree
* contrib/lisp/org-export.el (org-export-get-subtree-options): Make
  sure point is at an headline and buffer isn't narrowed before
  looking for EXPORT_TITLE property.
* testing/lisp/test-org-export.el: Add test.
2012-06-18 01:34:57 +02:00
Nicolas Goaziou a2fd96a3de org-export: Fix code comments 2012-06-12 17:31:48 +02:00
Nicolas Goaziou eb69035d5e org-export: Fix template for derived back-ends
* contrib/lisp/org-export.el (org-export-as): Fix template for derived
  back-ends.
2012-06-12 13:48:19 +02:00
Nicolas Goaziou 68a595ce9d org-export: Add `org-export-read-attribute' for normalized attr lines
* contrib/lisp/org-export.el (org-export-read-attribute): New function.
* testing/lisp/test-org-export.el: Add test.
2012-06-12 10:25:00 +02:00
Nicolas Goaziou f56e862b1e org-export: Change signatures of first-sibling-p and last-sibling-p
* contrib/lisp/org-export.el (org-export-first-sibling-p,
  org-export-last-sibling-p): Remove communication channel from
  signature.
* contrib/lisp/org-e-html.el (org-e-html-headline): Apply signature
  changes.
* contrib/lisp/org-e-latex.el (org-e-latex-headline): Apply signature
  changes.
* contrib/lisp/org-e-odt.el (org-e-odt-headline): Change code
  comments.
2012-06-09 11:34:16 +02:00
Nicolas Goaziou 4dee3eb952 org-export: Update code comments 2012-06-09 10:31:46 +02:00
Nicolas Goaziou e23f506d98 org-export: Add function to change elements in parse tree
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Ensure initial accumulator in non-nil.
(org-export-set-element): New function.
* testing/lisp/test-org-export.el: Add test.
2012-06-09 00:17:40 +02:00
Nicolas Goaziou 03739dd512 org-export: Fix code typo
* contrib/lisp/org-export.el (org-export-get-ordinal): Fix code typo.
2012-06-09 00:17:40 +02:00
Nicolas Goaziou 4728a4611e org-export: Rewrite topology functions
* contrib/lisp/org-export.el (org-export-get-genealogy,
  org-export-get-parent, org-export-get-parent-headline,
  org-export-get-parent-table): Rewrite function to use :parent
  property.  Remove communication channel from signature.
(org-export-get-parent-element): Rename from
`org-export-get-parent-paragraph'.
(org-export-data, org-export-table-row-is-special-p)
org-export-table-row-group, org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-header-p,
org-export-table-row-ends-header-p, org-export-table-cell-address,
org-export-first-sibling-p, org-export-last-sibling-p,
org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply
signature change.
(org-export--skip-p, org-export-table-cell-width,
org-export-table-cell-alignment, org-export-table-cell-borders):
Refactor code.  Apply signature change.
* contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width,
  org-e-ascii--unique-links, org-e-ascii-inlinetask,
  org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section,
  org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature
  change.
* contrib/lisp/org-e-html.el (org-e-html-link,
  org-e-html-link--inline-image): Use new function and apply signature
  change.
(org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph,
org-e-html-section, org-e-html-table-cell, org-e-html-table-row,
org-e-html-footnote-reference): Apply signature change.
* contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use
  new function and apply signature change.
(org-e-latex-footnote-reference, org-e-latex-item,
org-e-latex-table-cell, org-e-latex-table-row): Apply signature
change.
* contrib/lisp/org-e-odt.el (org-e-odt-format-formula,
  org-e-odt-format-label, org-e-odt-link--inline-image): Use new
  function and apply signature change.
(org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph,
org-e-odt-plain-list, org-e-odt-table-style-spec,
org-e-odt-get-table-cell-styles, org-e-odt-table-cell,
org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference,
org-e-odt-enumerate-element): Apply signature change.
2012-06-09 00:17:30 +02:00
Nicolas Goaziou 3f0f8734ff org-export: Suppress some byte-compiling warnings 2012-06-08 16:12:47 +02:00
Nicolas Goaziou 451191bc41 org-export: Correctly resolve fuzzy links whose path starts with *
* contrib/lisp/org-export.el (org-export-resolve-fuzzy-link):
  Correctly resolve fuzzy links whose path starts with *
* testing/lisp/test-org-export.el: Add tests.
2012-06-07 00:06:19 +02:00
Nicolas Goaziou ad235400a6 org-export: Support for external id links
* contrib/lisp/org-export.el (org-export-get-buffer-attributes):
  Retrieve footnote definitions and id in buffer.
(org-export-store-footnote-definitions): Removed function.
(org-export-collect-tree-properties): Update docstring.
(org-export-as): Do not call `org-export-store-footnote-definitions'.
(org-export-resolve-id-link): Return external file name when there's
no match for id in current parse tree.
* contrib/lisp/org-e-latex.el (org-e-latex-link): Handle external id
  links.
* testing/lisp/test-org-export.el: Add tests.
2012-06-06 23:39:04 +02:00
Nicolas Goaziou 4aa8693c2c org-export: Remove paths from requires
* contrib/lisp/org-export.el: Remove paths from requires.
2012-05-28 15:49:07 +02:00
Nicolas Goaziou 4b0121fc2a org-export: Move requires into dispatcher
* contrib/lisp/org-export.el (org-export-dispatch): Move requires into
  dispatcher.

This is a temporary change, until interactive functions in back-ends
can be properly autoloaded.
2012-05-28 09:34:23 +02:00