Commit Graph

255 Commits

Author SHA1 Message Date
Nicolas Goaziou a526ee3b82 Fix 464cd96
* lisp/ox-html.el (org-html-link):
* lisp/ox-md.el (org-md-link): Fix errors introduced in
  464cd965cb.
2014-10-03 22:23:25 +02:00
Rasmus 464cd965cb ox: Support unnumbered headlines via property
* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support unnumbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
2014-10-03 22:06:34 +02:00
Nicolas Goaziou 80e493a1f7 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-09-18 22:08:30 +02:00
Nicolas Goaziou 873fe49811 ox-html: Fix linking to deep level headlines
* lisp/ox-html.el (org-html-headline): Make sure even listified
  headlines have proper anchors so internal links can refer to them.
  Small refactoring.

Thanks to Bruce Gilstrap for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90835
2014-09-18 21:37:07 +02:00
Nicolas Goaziou 3432681fbe Parsing and exporting special blocks preserve case
* lisp/org-element.el (org-element-special-block-parser):
* lisp/ox-latex.el (org-latex-special-block):
* lisp/ox-html.el (org-html-special-block):
* lisp/ox-man.el (org-man-special-block):
* lisp/ox-odt.el (org-odt-special-block):
* lisp/ox-texinfo.el (org-texinfo-special-block):
* contrib/lisp/ox-groff.el (org-groff-special-block): Preserve case.

* testing/lisp/test-org-element.el (test-org-element/special-block-parser):
  Add test.
2014-09-17 20:52:54 +02:00
Nicolas Goaziou e3369c07f0 Revert "Merge export and special blocks within back-ends"
This reverts commit fbc7097ffa.

Conflicts:
	lisp/ox-texinfo.el
2014-09-08 11:57:27 +02:00
Nicolas Goaziou 1a7c9d7d79 ox-html: Fix 9a34a1
* lisp/ox-html.el (org-html-paragraph): Only apply special rule in
  list items.

Thanks to Richard Lawrence for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90532
2014-09-06 19:03:18 +02:00
Nicolas Goaziou 5da35ee0ca Merge branch 'maint' 2014-08-28 01:04:01 +02:00
Nicolas Goaziou ae457e7dce Fix exporting radio link with missing radio target
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-odt.el (org-odt-link): When radio link has no valid
  target (e.g., this is a subtree export and the radio target is not
  in the exported subtree), simply return contents.

Thanks to Daniel Clement for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90218
2014-08-28 00:48:17 +02:00
Nicolas Goaziou 9a34a13c07 ox-html: Better criterion for first paragraphs in lists
* lisp/ox-html.el (org-html-paragraph): Do not wrap first paragraph in
  an item within <p> tags in the most simple cases.

Thanks to Daniel Clemente for suggesting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89413
2014-08-26 09:55:54 +02:00
Nicolas Berthier 2ea7bf4042 ox-html: Support for exporting inline source code to HTML
* lisp/ox-html.el (org-html-inline-src-block): support for exporting
inline source code to HTML.
2014-08-22 14:39:39 +02:00
Rick Frankel 6fa58b3cc2 Fix html checkbox output.
* lisp/ox-html.el (html): Add missing `:html-checkbox-type' option.
2014-08-06 10:24:27 -04:00
Nicolas Goaziou 6ba05e3200 ox-html: Fix missing <span> block around section number
* lisp/ox-html.el (org-html-headline): Add <span> element around
  section number.

http://permalink.gmane.org/gmane.emacs.orgmode/89369
2014-08-02 15:36:42 +02:00
Nicolas Goaziou cc7d757571 ox-html: Fix missing section number in ids
* lisp/ox-html.el (org-html-headline): Fix missing section number in
  div ids.

Thanks to Matt Lundin for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89291
2014-07-31 10:59:58 +02:00
Matt Lundin 282d8c86e7 Fix broken links in html publishing
* lisp/ox-html.el: Fix incorrect property name in :options-alist of
  html backend definition.
2014-07-30 09:57:18 +02:00
Nicolas Goaziou c9ca0b6df8 ox-html: Use options instead of hard-coded variables
* contrib/lisp/ox-s5.el (org-s5--format-toc-headline): Apply signature
  change.

* lisp/ox-md.el (org-md-headline): Apply signature change.

* lisp/ox-html.el (org-html-format-drawer-function,
  org-html-publish-to-html): Small reformatting.

(org-html-infojs-install-script, org-html--build-meta-info,
org-html--build-mathjax-config, org-html-format-spec,
org-html--build-pre/postamble, org-html-template, org-html-toc,
org-html--format-toc-headline, org-html-list-of-listings,
org-html-list-of-tables, org-html-bold, org-html-drawer,
org-html-headline, org-html-inlinetask, org-html-italic,
org-html-checkbox, org-html-inline-image-p, org-html-link,
org-html-section, org-html-strike-through, org-html-table-cell,
org-html-table-row, org-html-underline, org-html-verbatim,
org-html-final-function, org-html-export-to-html): Do not use
hard-coded variable names.

(org-html-format-headline-function,
org-html-format-inlinetask-function): Change default value.  Require
an additional argument.

(org-html-format-footnote-reference,
org-html-format-footnotes-section,
org-html-format-footnote-definition, org-html-format-headline,
org-html-format-headline--wrap, org-html-format-section): Remove
functions.

(org-html-footnote-section, org-html-footnote-reference): Apply
function removal.  Do not use hard-coded variable names.

(org-html--anchor, org-html--todo, org-html--tags): Change signature.
Do not use hard-coded variable names.

(org-html-radio-target, org-html-target): Apply signature change.

(org-html-format-headline-default-function,
org-html-format-inlinetask-default-function): New functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou fd448cb1e2 Remove some options associated to variables
* lisp/ox-html.el: Remove options.

* lisp/ox-icalendar.el: Remove options.

* lisp/ox-latex.el (org-latex-guess-inputenc, org-latex-compile,
  org-latex--collect-warnings): Use full variable name instead of an
  option.

* lisp/ox-man.el: Remove options.

* lisp/ox-odt.el: Remove options.

* lisp/ox-texinfo.el: Remove options.

* doc/org.texi (Publishing options): Update documentation accordingly.

These variables are meant to be used outside (or on the fringe) of the
export process, where information channel is not available.

remove
2014-07-29 15:45:18 +02:00
Bastien Guerry 44aaaad8c0 ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode
* ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode.

Thanks to Kaushal for suggesting this.
2014-07-28 11:07:03 +02:00
Bastien Guerry ac4b11e565 ox-html.el (org-html-protect-char-alist): Make a defvar
* ox-html.el (org-html-protect-char-alist): Make a defvar.
2014-07-27 19:55:49 +02:00
Nicolas Goaziou fbc7097ffa Merge export and special blocks within back-ends
* lisp/ox-ascii.el (org-ascii-export-block): Remove function.
(org-ascii-special-block): Handle raw special blocks.

* lisp/ox-beamer.el (org-beamer-export-block): Remove function.

* lisp/ox-html.el (org-html-export-block): Remove function.
(org-html-special-block): Handle raw special blocks.

* lisp/ox-latex.el (org-latex-export-block): Remove function.
(org-latex-special-block): Handle raw special blocks.

* lisp/ox-man.el (org-man-export-block): Remove function.
(org-man-special-block): Handle raw special blocks.

* lisp/ox-md.el (org-md-export-block): Remove function.

* lisp/ox-odt.el (org-odt-export-block): Remove function.
(org-odt-special-block): Handle raw special blocks.

* lisp/ox-texinfo.el (org-texinfo-export-block): Remove function.
(org-texinfo-special-block): Handle raw special blocks.

* contrib/lisp/ox-groff.el (org-groff-export-block): Remove function.
(org-groff-special-block): Handle raw special blocks.

* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-block):
  Remove function.
2014-07-27 14:29:24 +02:00
Eric Schulte 1c3bdbb80a inhibit <p> wraps on a whole-list basis
* lisp/ox-html.el (org-html-paragraph): Extend the special case of
  inhibiting <p> wrappers to only perform such inhibition when *every*
  element of the list is a single paragraph long.  Otherwise unsightly
  spacing results.
2014-06-23 20:08:09 -04:00
Bastien Guerry f36b19eef6 org.el: Send a warning when org-loaddefs.el could not be found
* org.el: Send a warning when org-loaddefs.el could not be
found in the directory where this org.el file is loaded from.

* ox-org.el (org-org-publish-to-org):
* ox-odt.el (org-odt-do-format-code):
* ox-html.el (org-html-fontify-code):
* org.el (org-fontify-like-in-org-mode):
* org-src.el (org-src-font-lock-fontify-block):
* org-clock.el (org-clock-get-clocktable): Use
`font-lock-ensure' instead of `font-lock-fontify-buffer'.

* org.el (org-outline-level, org-copy-subtree)
(org-sort-entries, orgstruct-setup, org-show-context)
(org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick)
(org-goto-sibling, org-goto-first-child, org-show-entry): Use
`ignore-errors' instead of (condition-case nil ... (error nil)).

People trying to load org.el when org-loaddefs.el is not available
has been a major cause of trouble when installing Org.  The warning
tells them what they need to do.
2014-05-29 22:08:43 +02:00
Nicolas Goaziou 7a956c3880 Associate all defcustoms to options in back-end definitions
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
  back-end.
* lisp/ox-icalendar.el (icalendar): Ditto.  Also rename :with-vtodo
  property to :icalendar-include-todo.

* doc/org.texi (Publishing options): Update back-end specific
  properties.  Remove @vindex entries so as not to clobber variables
  index.

This change allows to change default value for any defcustom on the
fly when publishing.  It also normalizes how to choose and name what
variables to define as back-end options.
2014-05-28 14:53:29 +02:00
Nicolas Goaziou 6cdf1b6d3f Merge branch 'maint' 2014-05-15 13:45:38 +02:00
Nicolas Goaziou ab1ce2a757 ox-html: Fix spurious "figure" divs on empty paragraphs
* lisp/ox-html.el (org-html-standalone-image-p): Ensure paragraph
  contains at least a link before return a non-nil value.  Clarify
  docstring.

Thanks to Fabrice Popineau for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86314
2014-05-15 13:44:18 +02:00
Nicolas Goaziou 5bece6f014 ox-html: Fix link handling
* lisp/ox-html.el (org-html-link): Use `org-link-escape-browser'.

Thanks to Michael Brand for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85789
2014-05-04 21:41:43 +02:00
Bastien Guerry f588f6d884 Merge branch 'maint' 2014-04-22 10:42:10 +02:00
Bastien Guerry 6f1b5185c2 ox-html.el (org-html-infojs-install-script): Don't install infojs scripts when #+INFOJS_OPT: is empty
* ox-html.el (org-html-infojs-install-script): Don't install
infojs scripts when #+INFOJS_OPT: is empty.

Thanks to Diez B. Roggisch for reporting this.
2014-04-22 10:41:56 +02:00
Rick Frankel dd8b3cbf36 Fix list item class attribute.
* lisp/ox-html.el (org-html-format-list-item): Make sure checkbox type
  class attribute only added to list item if item is a checkbox.
2014-04-17 15:16:19 -04:00
Nicolas Goaziou fffd055ac5 Merge branch 'maint'
Conflicts:
	lisp/org-element.el
	lisp/ox-html.el
2014-04-17 11:34:54 +02:00
Nicolas Goaziou 9dac00129d Update export back-ends wrt "file" link changes
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-html.el (org-html-link):  Do not expand absolute file names
  and do not try to fix hierarchy part, as it is already taken care of
  at the parser level.

* lisp/ox-md.el (org-md-link): Ditto.  Also fix absolute file names.

* lisp/ox-odt.el (org-odt-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-texinfo.el (org-texinfo-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Do not prepend
  scheme part to relative file names either.

* contrib/lisp/ox-deck.el (org-deck-link): Small refactoring.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 73c141e43e Revert "Fix link export"
This reverts commit fc1f7d752f.
2014-04-17 11:30:14 +02:00
Nicolas Goaziou 7b3c11f797 Revert "Fix mailto links"
This reverts commit f61cd6b7a1.
2014-04-17 11:30:14 +02:00
Rick Frankel 8d20a8419f Add classes to checkbox list elements.
* lisp/ox-html.el (org-html-format-list-item): Add the appropriate
  class `on', `off' or `trans' (the tri-state checkbox types) to the
  list elements in checkbox lists.
2014-04-16 21:10:34 -04:00
Rick Frankel 93ff3e5cb7 Process html attributes on paragraphs.
* lisp/ox-html.el (org-html-paragraph): Add processed html attributes
  to paragraph tag.
2014-04-16 21:09:57 -04:00
Nicolas Goaziou ee3cf87d40 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-04-14 13:56:05 +02:00
Nicolas Goaziou f61cd6b7a1 Fix mailto links
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* contrib/lisp/ox-groff.el (org-groff-link): "mailto" URI do not have
  an authority part, we do not append "//".
2014-04-14 13:47:57 +02:00
Nicolas Goaziou d34fa17716 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-04-14 12:41:38 +02:00
Nicolas Goaziou fc1f7d752f Fix link export
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Append "//" after some link
  types.

* lisp/ox-md.el (org-md-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Also remove some
  unused code, as search options are already stripped out link's path.

Since 3589f64e42, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.
2014-04-14 12:36:34 +02:00
Rick Frankel 37df5f94f4 Allow disabling of htmlization in ox-html export.
* lisp/ox-html.el (org-html-htmlize-output-type): Add `nil'
  option (no htmlization).
(org-html-fontify-code): Return plain text if
`org-html-htmlize-output-type' is `nil'.
2014-03-26 08:42:23 -04:00
Nicolas Goaziou 230d09aeb0 Merge branch 'maint' 2014-03-24 14:20:23 +01:00
Nicolas Goaziou 2e79bd8119 export back-ends: Update radio target export
* 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-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link): Update radio target export according
  to recent changes.

See bug report at http://permalink.gmane.org/gmane.emacs.orgmode/82923
2014-03-24 14:13:24 +01:00
Bastien Guerry 4223367f89 ox-html.el: Enhance docstrings
* ox-html.el (org-html-table-header-tags)
(org-html-table-data-tags): Enhance docstrings.
2014-03-19 11:27:18 +01:00
Nicolas Goaziou 17ecfd4130 Merge branch 'maint' 2014-03-17 10:33:21 +01:00
Nicolas Goaziou 44095d483b Revert "Fix links to radio targets."
This reverts commit d2e7b1b5b1.
2014-03-17 10:05:52 +01:00
Bastien Guerry ed3f1288cb Merge branch 'maint' 2014-03-17 03:00:04 +01:00
Bastien Guerry d2e7b1b5b1 Fix links to radio targets.
* ox-latex.el (org-latex-link):
* ox-html.el (org-html-link):
* ox-beamer.el (org-beamer-link): Fix links to radio targets.

* ox-ascii.el (org-ascii-link): For links to a radio target,
use the link, not the target.

Thanks to Noah Slater for reporting this.
2014-03-17 02:58:02 +01:00
Nicolas Goaziou 818e2a1de7 Merge branch 'maint' 2014-03-16 10:56:46 +01:00
Rasmus d9dd1e6bd5 Remove reference to hgroup in ox-html
* ox-html.el (org-html-html5-elements): Drop reference to hgroup.
2014-03-16 10:56:09 +01:00
Michael Brand 54e3009d73 Fix escaping of more links in HTML export
* lisp/org.el (org-link-escape-chars): Extend docstring.
(org-link-escape-chars-browser): Mention in docstring that it will
become a candidate for removal.
(org-link-escape-browser): Mention in docstring that it will become a
candidate for removal.
(org-open-at-point): Move `url-encode-url' and comments into
`org-link-escape-browser'.

* lisp/ox-html.el (org-html-link): Make use of
`org-link-escape-browser' like `org-open-at-point'.

* testing/lisp/test-org.el (test-org/org-link-escape-chars-browser):
Mention in docstring that it will become a candidate for removal.
2014-02-19 20:49:21 +01:00