Commit Graph

236 Commits

Author SHA1 Message Date
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
Rick Frankel 9715523abe Fix escaping of links in html export.
* lisp/ox-html.el (org-html-link): Unescape org-escaped links an
  re-escape for html (browser).
2014-02-11 11:08:57 +01:00
Nicolas Goaziou 81f2f5a6e8 Export back-ends: Remove quote section translators
* lisp/ox-ascii.el (org-ascii--current-text-width): Remove
  `quote-section' reference.
  (org-ascii-quote-section): Remove function.
* lisp/ox-html.el (org-html-quote-section): Remove function.
* lisp/ox-man.el (org-man-quote-section): Remove function.
* lisp/ox-md.el (org-md-quote-section): Remove function.
* lisp/ox-odt.el (org-odt-quote-section): Remove function.
* lisp/ox-org.el (org-org-quote-section): Remove function.
* lisp/ox-texinfo.el (org-texinfo-quote-section): Remove function.
2014-01-27 21:14:44 +01:00
Nicolas Goaziou 9d5e11fc79 export back-ends: Reorder options in templates
* lisp/ox-beamer.el: Be more cautious about the order in which options
  are defined, at this order will be the same when creating an export
  template (see `org-export-insert-default-template').
* lisp/ox-html.el: Ditto.
* lisp/ox-latex.el: Ditto.
* lisp/ox.el: Ditto.
2014-01-22 15:45:23 +01:00
Rick Frankel e955be903a Add better svg support to html exporter.
* lisp/ox-html.el (org-html--format-image): If image is an svg file,
  format as "object" using new function `org-html--svg-image' instead
  of "img".
2014-01-16 17:35:55 -05:00
Rick Frankel 1376df2648 Use an overridable list of available doctypes for customization.
* lisp/ox-html.el (org-html-doctype): Use choice of available
  doctypes (from `org-html-doctype-alist) plus user-entered string.
2014-01-16 17:35:39 -05:00
Nicolas Goaziou 1d7bf33c5f ox-html: Fix a docstring
* lisp/ox-html.el (org-html-allow-name-attribute-in-anchors): Default
  value changed in 36a21d9372.  The
  docstring now reflects this change.
2014-01-10 10:07:22 +01:00
Nicolas Goaziou d0538affec ox-html: Fix a docstring
* lisp/ox-html.el (org-html-checkbox-types): Emphasize valid symbols
  to use for configuration.
2014-01-10 10:00:17 +01:00
Nicolas Goaziou 78e66c7212 ox-html: Fix checkbox customization
* lisp/ox-html.el (org-html-checkbox-types): Fix docstring.
(org-html-checkbox-type): Use symbols instead of strings.  It avoids
to rely on `intern' later on.  Modify docstring so its first line
contains only a complete sentence.
(org-html-checkbox): Use `assq' instead of `assoc'.

This fixes 2c782da801.
2014-01-10 09:52:08 +01:00
Rick Frankel 2c782da801 Add customization options for html checkboxes.
(org-html-checkbox-types): New constant. Contains unicode, ascii and html
checkbox alists.
(org_html_checkbox_type): New customzation variable can be set to one
of the above choices.  Defaults to "ascii"
(org-html-checkbox): Use the appropriate set of checkboxes as
specified in `org-html-checkbox-type'.
2014-01-09 18:04:09 -05:00
Rick Frankel 36a21d9372 Default `org-html-allow-name-attribute-in-anchors' to nil for HTML5
compatibily.
2014-01-09 18:00:52 -05:00
Bastien Guerry c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry 3737676632 Update copyright year for files changed since 2013 2014-01-05 06:35:21 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Nicolas Goaziou eb5cb33218 Merge branch 'maint' 2014-01-01 19:07:31 +01:00
Nicolas Goaziou 1a3591c0e7 ox-html: Clean up some comments
* lisp/ox-html.el: Clean up "FIXME" comments.
2014-01-01 19:05:49 +01:00
Nicolas Goaziou 4d652d21ae ox-html: Change default behaviour for unresolved link options
* lisp/ox-html.el (org-html-link): When an option cannot be resolved,
  append a hash sign as it could point to a target, instead of
  ignoring it.
2014-01-01 18:58:26 +01:00
Bastien Guerry f58a8482b4 Merge branch 'maint' 2013-12-30 10:44:57 +01:00