Commit Graph

112 Commits

Author SHA1 Message Date
Nicolas Goaziou ec8f3f987e Merge branch 'maint' 2013-06-25 09:33:39 +02:00
Nicolas Goaziou a52a35779f ox: Remove useless dictionary entries
* lisp/ox.el (org-export-dictionary): Remove useless dictionary entries.
* lisp/ox-ascii.el (org-ascii--build-caption): Apply removal.
2013-06-25 09:29:18 +02:00
Nicolas Goaziou 42a9473aed ox: Add spanish and german translations
* lisp/ox.el (org-export-dictionary): Add spanish and german
  translations.

Patch suggested by Georg Lehner.
2013-06-25 09:15:24 +02:00
Nicolas Goaziou 4788a58e71 Merge branch 'maint' 2013-06-18 22:48:08 +02:00
Nicolas Goaziou 60899b1a2f ox: Fix fuzzy link resolution before first headline
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix link resolution when
  link lives before the first headline.
* testing/lisp/test-ox.el: Add test.
2013-06-18 22:29:49 +02:00
Nicolas Goaziou 221768a768 Merge branch 'maint' 2013-06-05 14:24:58 +02:00
Nicolas Goaziou 4b7006f444 ox: Fix "Wrong argument type" error when attributes start with :key ""
* lisp/ox.el (org-export-read-attribute): Fix "Wrong argument type"
  error when attributes start with :key "".
2013-06-05 14:24:18 +02:00
Nicolas Goaziou d3eaa6abb6 Merge branch 'maint' 2013-05-25 14:37:01 +02:00
Nicolas Goaziou 87ab99f563 org-element/ox: Fix src-block indentation when it should be preserved
* lisp/org-element.el (org-element--remove-indentation): New function.
(org-element-example-block-parser, org-element-src-block-parser): Use
new function.
(org-element-src-block-interpreter): Update function according to
change.
* lisp/ox.el (org-export-unravel-code): Do not remove any indentation
  since it now happens at the parser level.
* testing/lisp/test-org-element.el: Add tests.
* testing/lisp/test-ox.el: Refactor tests.
2013-05-25 14:35:24 +02:00
Nicolas Goaziou 419b69a435 Merge branch 'maint' 2013-05-20 11:34:59 +02:00
Nicolas Goaziou 4daf9d60d9 ox: Small fix to cell width caching mechanism
* lisp/ox.el (org-export-table-cell-width): Be sure to use cache even
  when stored value is nil.
2013-05-20 11:33:11 +02:00
Nicolas Goaziou a5872b9eca Merge branch 'maint' 2013-05-19 09:54:18 +02:00
Nicolas Goaziou aafb2d2b46 ox: Fix "Symbol's value as variable is void: org-export--default-title"
* lisp/ox.el (org-export--default-title): Fix "Symbol's value as
  variable is void: org-export--default-title".

Bug was introduced in b70e77343a.
2013-05-19 09:52:57 +02:00
Nicolas Goaziou 63531fb2cc Merge branch 'maint' 2013-05-18 18:26:56 +02:00
Nicolas Goaziou 62296ceb88 ox: Improve speed wrt table export
* lisp/ox.el (org-export-resolve-fuzzy-link): Change property name
  holding cache.
(org-export-table-has-header-p, org-export-table-row-group,
org-export-table-cell-width, org-export-table-cell-alignment): Cache
results.
(org-export-table-cell-address): Refactor.
(org-export-get-parent): Inline function.
* testing/lisp/test-ox.el: Update tests.
2013-05-18 18:20:46 +02:00
Nicolas Goaziou 15baadd8af Merge branch 'maint' 2013-05-15 21:20:29 +02:00
Nicolas Goaziou b70e77343a Fix options bug introduced in 16f12e
* lisp/ox.el (org-export-options-alist): Change default value
  for :title property.
(org-export--default-title): New dynamically scoped variable.
(org-export-store-default-title): New function.
(org-export--get-buffer-attributes): Remove title handling.
(org-export--get-global-options): Revert "ox: Fix default
title" (16f12e0aef).  Refactor code.
* testing/lisp/test-ox.el: Update a test.
2013-05-15 21:19:28 +02:00
Nicolas Goaziou 7dc2babf29 Merge branch 'maint' 2013-05-12 20:45:01 +02:00
Nicolas Goaziou 48e51fe5d9 ox: Ignore whitespace differences when resolving a radio link
* lisp/ox.el (org-export-resolve-radio-link): Ignore whitespace
  differences when resolving a radio link.
* testing/lisp/test-ox.el: Add test.
2013-05-12 20:42:30 +02:00
Nicolas Goaziou d542097aa3 Merge branch 'maint' 2013-05-12 17:56:14 +02:00
Nicolas Goaziou e7cd6f1875 ox: Fix radio target resolution
* lisp/ox.el (org-export-resolve-radio-link): Fix radio target
  resolution.
* testing/lisp/test-ox.el: Add test.
2013-05-12 17:54:56 +02:00
Carsten Dominik b3a88babf1 Merge branch 'fix-types' 2013-05-09 15:24:43 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Nicolas Goaziou 7e4c7edb8a ox: Small refactoring
* lisp/ox.el (org-export-expand-include-keyword): Avoid using `read'
  to determine file name.
2013-05-08 18:13:06 +02:00
Nicolas Goaziou 16f12e0aef ox: Fix default title
* lisp/ox.el (org-export--get-global-options): Properly set default
  title, i.e. when to TITLE keyword is provided.
* testing/lisp/test-ox.el: Add tests.
2013-05-08 16:00:18 +02:00
Nicolas Goaziou bd27a005bb ox: Tolerate included file names without double quotes
* lisp/ox.el (org-export-expand-include-keyword): Tolerate included
  file names without double quotes.
2013-05-07 17:47:59 +02:00
Nicolas Goaziou 3e1d83bf6b ox: Fix caching for fuzzy link resolution
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix caching process.
* testing/lisp/test-ox.el: Add test.
2013-05-04 09:03:00 +02:00
Lawrence Mitchell b7301bd639 ox: Cache locations of fuzzy links
* ox.el (org-export-resolve-fuzzy-link): Look for fuzzy link in a
  cache before trying to resolve it in the parse tree.

When a document contains a large number of identical fuzzy links, it
doesn't make sense to continually search for them.  Instead, cache the
locations in the position independent case.
2013-05-02 14:50:42 +02:00
Nicolas Goaziou eba04bfb3c ox-org: Preserve affiliated keywords
* lisp/ox.el (org-export-expand): Optionally add affiliated keywords
  to results.
* lisp/ox-org.el (org-org-identity): Use new argument for
  `org-export-expand'.
2013-04-26 15:53:05 +02:00
Nicolas Goaziou d408d721c3 ox: Fix `org-export-with-footnotes' behaviour
* lisp/ox.el (org-export--skip-p, org-export--interpret-p): When
  `org-export-with-footnotes' is nil, ignore completely footnotes
  references and definitions instead of exporting them verbatim.
* testing/lisp/test-ox.el: Add tests.
2013-04-21 23:44:18 +02:00
Nicolas Goaziou 60aa1682ce ox: Change scope for `org-export-with-timestamps'
* lisp/ox.el (org-export-with-timestamps): Only applies to isolated
  timestamps, i.e. timestamps in a paragraph containing only
  timestamps and empty strings.
(org-export--skip-p): Skip timestamps according to new behaviour.
* testing/lisp/test-ox.el: Update tests.
2013-04-18 16:58:56 +02:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.

* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
2013-04-18 10:29:00 +02:00
Nicolas Goaziou 407a6acf4d ox/ox-latex: Fix docstrings
* lisp/ox-latex.el: Remove instructions since everything is documented
  in Org manual.
* lisp/ox.el (org-export-with-smart-quotes): Use LATEX instead of
  LaTeX for keywords, the latter being hard to type, somewhat
  difficult to read, and overall just pedantic.
2013-04-16 12:54:05 +02:00
Bastien Guerry 320b633b6e ox-latex.el (latex): Don't force exporting with smart quotes
* ox-latex.el (latex): Don't force exporting with smart
quotes.

* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.

Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.

We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
2013-04-16 11:39:41 +02:00
Nicolas Goaziou df2807b59d ox: Remove macro filters
* lisp/ox.el (org-export-filters-alist): Remove macro filter.
(org-export-filter-macro-functions): Remove variable.

Macro filters are never called since macro expansion happens before
the export process.
2013-04-15 08:22:51 +02:00
Bastien Guerry 4d77fb7696 ox.el: Fix tiny typo. 2013-04-15 00:55:26 +02:00
Bastien Guerry 7c048fd886 ox.el (org-export-with-planning): Enhance docstring
* ox.el (org-export-with-planning): Enhance docstring.
2013-04-14 11:46:45 +02:00
Nicolas Goaziou 659edb40a5 ox: Allow to use empty strings in attributes
* lisp/ox.el (org-export-read-attribute): Allow to use empty strings
  in attributes.
* testing/lisp/test-ox.el: Add tests.

With this patch,

  #+attr_backend: :a "" becomes (:a "")
  #+attr_backend: :a """" becomes (:a "\"\"")
  ...
2013-04-10 18:50:52 +02:00
Bastien Guerry b5f1ff6d83 ox.el (org-export-options-alist, org-export--skip-p): Use `:with-planning' instead of `:with-plannings'
* ox.el (org-export-options-alist, org-export--skip-p): Use
`:with-planning' instead of `:with-plannings', to keep in sync
with the corresponding option's name.
2013-04-10 14:57:41 +02:00
Nicolas Goaziou 5f48315568 ox: Add function returning row number in a table
* lisp/ox.el (org-export-table-row-number): New function.
(org-export-table-cell-address): Use new function.
* testing/lisp/test-ox.el: Add test.
2013-04-09 16:52:41 +02:00
Nicolas Goaziou d6d7bc55b8 ox/ox-html: Use a language agnostic and more neutral default creator
* lisp/ox-html.el (org-html-creator-string): Change default value.
* lisp/ox.el (org-export-creator-string): Change default value.
2013-04-07 20:21:58 +02:00
Nicolas Goaziou 2d6a90229d ox/ox-html: Fix defcustoms
* lisp/ox.el (org-export-with-archived-trees, org-export-with-author,
  org-export-with-clocks, org-export-with-date,
  org-export-creator-string, org-export-with-drawers,
  org-export-with-email, org-export-with-emphasize,
  org-export-exclude-tags, org-export-with-fixed-width,
  org-export-with-footnotes, org-export-with-latex,
  org-export-headline-levels, org-export-default-language,
  org-export-preserve-breaks, org-export-with-entities,
  org-export-with-inlinetasks, org-export-with-planning,
  org-export-with-priority, org-export-with-section-numbers,
  org-export-select-tags, org-export-with-smart-quotes,
  org-export-with-special-strings,
  org-export-with-statistics-cookies,
  org-export-with-sub-superscripts, org-export-with-toc,
  org-export-with-tables, org-export-with-tags,
  org-export-with-tasks, org-export-time-stamp-file,
  org-export-with-timestamps, org-export-with-todo-keywords): Fix
  docstrings.
* lisp/ox-html.el (org-html-postamble-format): Slightly change default
  value so "Generated by" string doesn't get duplicated.
(org-html-creator-string): Fix docstring.
2013-04-07 14:36:48 +02:00
Bastien Guerry 5e8f30f61e org-table.el (orgtbl-apply-fmt): Enhance docstring
* ox.el (org-export-table-row-group): Fix typo in docstring.
2013-04-07 10:05:13 +02:00
Bastien Guerry 3f4028312e ox.el: Fix typos
* org-table.el (orgtbl-apply-fmt): Enhance docstring.
2013-04-07 10:03:37 +02:00
Bastien Guerry 52ba37b8c8 Merge branch 'master' of orgmode.org:org-mode 2013-04-06 19:11:57 +02:00
Bastien Guerry 1e496cc8f9 ox.el (org-export-replace-region-by): New function
* ox.el (org-export-replace-region-by): New function.
* ox-texinfo.el (org-texinfo-convert-region-to-texinfo):
* ox-md.el (org-md-convert-region-to-md):
* ox-latex.el (org-latex-convert-region-to-latex):
* ox-html.el (org-html-convert-region-to-html): New functions
to replace the active region by its export into various
backends.
2013-04-06 19:09:38 +02:00
Nicolas Goaziou f2fd185175 ox: Inhibit startup process when calling `org-mode'
* lisp/ox.el (org-export--get-inbuffer-options,
  org-export--list-bound-variables, org-export--generate-copy-script,
  org-export-string-as, org-export-expand-include-keyword,
  org-export--prepare-file-contents): Inhibit startup process when
  calling `org-mode'.
2013-04-06 17:31:56 +02:00
Nicolas Goaziou 67cf80ae9a ox: Add a command to insert a default export template
* lisp/ox.el (org-export-insert-default-template): New function.
(org-export--dispatch-ui, org-export--dispatch-action): Access to the
function through the dispatcher.

From the dispatcher, if subtree export is selected, options will be
installed as node properties in current subtree.
2013-04-06 13:34:41 +02:00
Nicolas Goaziou 479c21336f Remove special behaviour for TARGET keyword
* lisp/org.el (org-store-link, org-link-search, org-options-keywords):
  Remove reference to TARGET keyword.
* lisp/ox.el (org-export-resolve-fuzzy-link, org-export-get-ordinal):
  Do not use TARGET as a destination for links anymore.
* testing/lisp/test-ox.el: Update tests.
* testing/lisp/test-org.el: Update tests.

Its specifications were not useful enough to keep maintaining this
feature.
2013-04-04 20:38:27 +02:00
Nicolas Goaziou 0bd6ccd6f9 ox: Add generic function to retrieve the date of a document
* lisp/ox.el (org-export-date-timestamp-format): New variable.
(org-export-get-date): New function.
* testing/lisp/test-ox.el: Add tests.
2013-04-02 23:55:28 +02:00