Commit Graph

94 Commits

Author SHA1 Message Date
Nicolas Goaziou e8120fbd55 ox-beamer: Do not require `cl' since `cl-lib' is used
* lisp/ox-beamer.el (org-beamer--normalize-argument):
(org-beamer-link): Use "cl" prefix.
2016-05-26 15:57:11 +02:00
Nicolas Goaziou 39cbbca8b6 ox-beamer: Fix "apply: Wrong number of arguments: max, 0"
* lisp/ox-beamer.el (org-beamer-select-environment): Use variable
  introduced in 4743d43.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
<http://permalink.gmane.org/gmane.emacs.orgmode/106705>
2016-04-28 23:29:17 +02:00
Kyle Meyer 6345de2d05 Merge branch 'maint' 2016-01-09 17:43:27 -05:00
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Nicolas Goaziou 54318add34 Change export block syntax
* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.

* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.

* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".

* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.

* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks.  Remove
  back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.

* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
  forbidden blocks.  Remove back-ends blocks, which are now special
  blocks.

* contrib/lisp/ox-extra.el: Update comments.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.

Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks.  The new syntax is

  #+BEGIN_EXPORT backend
  ...
  #+END_EXPORT

instead of

  #+BEGIN_backend
  ...
  #+END_backend

As a consequence, =INCLUDE= keywords syntax is modified, e.g.,

  #+INCLUDE: "file.org" HTML

becomes

  #+INCLUDE: "file.org" export html
2015-12-20 21:56:27 +01:00
Aaron Ecay e4cd3dd22b Remove some home-grown copies of cl-lib functions.
* lisp/org.el (org-count, org-remove-if, org-remove-if-not):
(org-reduce, org-every, org-some): Obsolete, use cl-lib versions
everywhere.
(org-sublist): Reimplement in terms of `cl-subseq'; make obsolete.
2015-11-06 12:50:40 +00:00
Nicolas Goaziou 6ea83b5660 ox-beamer: Silence byte-compiler
* lisp/ox-beamer.el (org-beamer-export-block): Silence byte-compiler.
2015-10-29 18:54:31 +01:00
Nicolas Goaziou d51e27e4fe ox-beamer: Use lexical binding
* lisp/ox-beamer.el (org-beamer-bold):
(org-beamer-export-block):
(org-beamer-export-snippet):
(org-beamer-item):
(org-beamer-link):
(org-beamer-target): Silence byte-compiler.
2015-10-29 18:39:29 +01:00
Nicolas Goaziou fcb75f322a Merge branch 'maint' 2015-10-16 22:53:22 +02:00
Nicolas Goaziou 0ee8ba3e0d ox-beamer: Fix labels
* lisp/ox-beamer.el (org-beamer--get-label): Remove protective braces
  when extracting label from options.
(org-beamer--format-frame): Protect label with braces if it contains
colons.

Based off a patch from Fabrice
Popineau (<http://permalink.gmane.org/gmane.emacs.orgmode/101933>).
2015-10-16 22:38:14 +02:00
Nicolas Goaziou e8f4488f43 ox-beamer: Obey to `org-latex-prefer-user-labels'
* lisp/ox-beamer.el (org-beamer--get-label): Obey to
  `org-latex-prefer-user-labels'.

Suggested-by: Fabrice Popineau <fabrice.popineau@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101894>
2015-10-15 10:33:27 +02:00
Nicolas Goaziou fa61cb4079 Merge branch 'maint' 2015-10-13 23:57:48 +02:00
Nicolas Goaziou 1c7dca9692 ox-beamer: Fix againframe command
* lisp/ox-beamer.el (org-beamer-headline): Make sure any fuzzy reference
  provided for an againframe ends up pointing to a headline.
2015-10-13 23:51:17 +02:00
Rasmus 718fee3049 ox-beamer: Support #+LATEX_COMPILER
* ox-beamer.el (org-beamer-template): Insert compiler and remove
  unused packages.
2015-10-04 15:54:28 +02:00
Rasmus bb51d25def ox-beamer: Remove numbers in template comments
* ox-beamer.el (org-beamer-template): Remove numbering of
  comments as it creates dependency between comments.
2015-10-04 15:54:28 +02:00
Suvayu Ali 2cddb905a4 ox-beamer: Wrap labels in braces
* ox-beamer.el (org-beamer--get-label): Wrap labels in braces.

The colon in the label name causes an argument parsing problem, for
more see <http://tex.stackexchange.com/q/250640/4416>.
2015-06-16 21:30:41 +02:00
Nicolas Goaziou cf5fd31f0c ox-beamer: Add %R and %O placeholders for extra environments
* lisp/ox-beamer.el (org-beamer-environments-extra): Handle "%R" and
  "%O" placeholders.
(org-beamer--format-block): Fill template with appropriate values for
placeholders above.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98361>
2015-06-16 15:26:47 +02:00
Nicolas Goaziou a02b672f93 ox-beamer: Fix labels to headlines
* lisp/ox-beamer.el (org-beamer--get-label): Use headline's internal
  reference instead of using numbers.
2015-06-16 14:04:53 +02:00
Nicolas Goaziou 4590332652 Export back-ends: Use `org-export-get-reference'
* lisp/ox-beamer.el (org-beamer-link):
(org-beamer-plain-list):
(org-beamer-target):
(org-beamer-radio-target):

* lisp/ox-html.el (org-html--wrap-image):
(org-html--format-toc-headline):
(org-html-list-of-listings):
(org-html-list-of-tables):
(org-html-headline):
(org-html-inline-src-block):
(org-html-link):
(org-html-paragraph):
(org-html-section):
(org-html-radio-target):
(org-html-src-block):
(org-html-table):
(org-html-target):

* lisp/ox-latex.el (org-latex--caption/label-string):
(org-latex--wrap-label):
(org-latex-center-block):
(org-latex-drawer):
(org-latex-dynamic-block):
(org-latex-example-block):
(org-latex-fixed-width):
(org-latex-headline):
(org-latex-horizontal-rule):
(org-latex-latex-environment):
(org-latex-link):
(org-latex-plain-list):
(org-latex-quote-block):
(org-latex-radio-target):
(org-latex-target):
(org-latex-verse-block):

* lisp/ox-man.el (org-man-target):

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

* lisp/ox-odt.el (org-odt-format-headline--wrap):
(org-odt-headline):
(org-odt-format-label):
(org-odt-link--infer-description):
(org-odt-link):
(org-odt-radio-target):
(org-odt-target):

* lisp/ox-texinfo.el (org-texinfo--get-node):
(org-texinfo-radio-target):
(org-texinfo-target):

* contrib/lisp/ox-groff.el (org-groff-link):
(org-groff-radio-target):
(org-groff-target):

* contrib/lisp/ox-rss.el (org-rss-headline): Use
  `org-export-get-reference'.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou d7e7b78c2e Fix a780080fcf
* lisp/ox-latex.el (latex): Parse SUBTITLE, DESCRIPTION and KEYWORDS.
* lisp/ox-beamer.el (org-beamer-template): Do not parse again
  SUBTITLE.
2015-04-09 10:04:29 +02:00
Rasmus a780080fcf ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.

The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-04-08 23:23:13 +02:00
Nicolas Goaziou ec54a5852d ox-beamer: Properly transcode description tags
* lisp/ox-beamer.el (org-beamer-item): Make sure description tags are
  transcoded using `beamer' back-end instead of `latex'.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/96345>
2015-03-24 09:15:47 +01:00
Nicolas Goaziou 16cea3d7b7 ox: Remove `comment' special value for `org-export-with-creator'
* lisp/ox.el (org-export-with-creator): Change default value.

* lisp/ox-ascii.el (org-ascii-template):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-template):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-org.el (org-org-template):
* lisp/ox-texinfo.el (org-texinfo-template): Treat
  `org-export-with-creator' as a boolean.

* testing/lisp/test-ox.el (test-org-export/parse-option-keyword):
  Update test.

* doc/org.texi (Export settings): Update allowed values in
  `org-export-with-creator'.

* etc/ORG-NEWS: Signal change.

Special `comment' value isn't meaningful for all back-ends and is not
implemented in every back-end where it makes sense anyway.

It is possible to add a comment including creator at the end of the
document using a body filter instead.
2015-03-17 15:51:22 +01:00
Rasmus a566f2865d ox-beamer: Fix hyperref bug
* ox-beamer.el (org-beamer-template): Typeset hyperref as in
  ox-latex.
2015-03-14 00:53:11 +01:00
Matthew Gidden 3d01a0bd19 ox-beamer.el: Update BEAMER_HEADER placement
* lisp/ox-beamer.el (`beamer-header'): Move BEAMER_HEADER injection to
  final part of preamble (after themes, title, etc.).  Allows for
  custom short titles, etc., with #+BEAMER_HEADER:
  \title[Short]{Long}.

* doc/org.texi: Updated BEAMER_HEADER entry with a relevant footnote.

Previously, TITLE, etc., was being injected after BEAMER_HEADER, so
short titles (and related) could not be added.  BEAMER_HEADER now
serves as a final preamble injection point.

TINYCHANGE
2015-03-10 21:20:29 +01:00
Nicolas Goaziou c76f254e8b ox: Fix custom link handling in anonymous back-end
* lisp/ox.el (org-export-custom-protocol-maybe): Change signature.
* 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-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-org.el (org-org-link):
* lisp/ox-texinfo.el (org-texinfo-link): Apply signature change.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe):
  Update test.

Provide explicitly back-end used instead of guessing it from INFO
channel as an anonymous back-end could be used, masquerading the real
one.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95402>
2015-02-24 15:54:01 +01:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Rasmus e6fcc853c5 ox: Optional export of title
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
  ox-ascii.el (org-ascii-template--document-title),
  ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
  ox-latex.el (org-latex-template), ox-man.el (org-man-template),
  ox-odt.el (org-odt-template), ox-org.el (org-org-template),
  ox-publish.el (org-publish-project-alist),
  ox-texinfo.el (org-texinfo-template),
  ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.

This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
2015-02-12 01:45:39 +01:00
Nicolas Goaziou 3900155788 Implement `org-export-custom-protocol-maybe' and use it
* lisp/ox.el (org-export-custom-protocol-maybe): New function.
* 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-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Use new function.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe): New
  test.
2015-01-04 22:16:36 +01:00
Aaron Ecay 9db1f7af78 ox-beamer: Don’t auto-label allowframebreaks frames; beamer forbids it.
* lisp/ox-beamer.el (org-beamer--format-frame): Don’t give a label if
allowframebreaks” is set.
2014-12-10 17:03:38 -05:00
Nicolas Goaziou 61ba40c371 ox: Deprecate `org-export-get-genealogy' for `org-element-lineage'
* lisp/ox.el (org-export-collect-tree-properties,
  org-export-numbered-headline-p, org-export-get-tags,
  org-export-resolve-fuzzy-link, org-export-get-ordinal,
  org-export-get-parent-headline, org-export-get-parent-element,
  org-export-get-parent-table):

* lisp/ox-ascii.el (org-ascii--current-text-width):

* lisp/ox-beamer.el (org-beamer--frame-level):

* lisp/ox-icalendar.el (org-icalendar-blocked-headline-p):

* lisp/ox-latex.el (org-latex-footnote-reference):

* lisp/ox-odt.el (org-odt--enumerate, org-odt-link--infer-description,
  org-odt-table): Use `org-element-lineage' instead of
  `org-export-get-genealogy'.
2014-11-16 13:30:33 +01:00
Nicolas Goaziou c177d3ca9e Merge branch 'maint' 2014-11-06 19:20:13 +01:00
Nicolas Goaziou 320381990e ox-beamer: Fix undefined reference with internal links
* lisp/ox-beamer.el (org-beamer-target): Use label macro instead of
  hypertarget.

Moreover, target syntax cannot take advantage of hypertarget's second
parameter.

<http://permalink.gmane.org/gmane.emacs.orgmode/92455>
2014-11-06 19:18:34 +01: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 73cd3ba7b3 ox-beamer: Use \columnwidth instead of \textwidth for columns
* lisp/ox-beamer.el (org-beamer--format-block): Use columnwidth
  instead of textwidth.

Thanks to Julien Cubizolles for suggesting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90246
2014-08-29 09:47:46 +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
Aaron Ecay 7cf7e4454f ox-beamer.el: Match latex backend in generation of \author.
* lisp/ox-beamer.el (org-beamer-template): Match latex backend in
generation of \author.
2014-08-22 15:42:45 -04:00
Nicolas Goaziou 0540dccadd Use options instead of hard-coded variables
* lisp/ox-beamer.el (org-beamer--format-frame,
  org-beamer--format-block, org-beamer-template): Use options instead
  of hard-coded variables.

* lisp/ox-man.el (org-man-inline-src-block, org-man-src-block,
  org-man-table, org-man-table-cell): Use options instead of
  hard-coded variables.

* lisp/ox-md.el (org-md-headline): Use options instead of hard-coded
  variables.

* lisp/ox-texinfo.el (org-texinfo-format-headline-function,
  org-texinfo-format-inlinetask-function): Change default value.
(org-texinfo--text-markup, org-texinfo--format-menu): Change signature
(org-texinfo--build-menu, org-texinfo-bold, org-texinfo-code,
org-texinfo-comment, org-texinfo-italic, org-texinfo-verbatim): Apply
signature change.

(org-texinfo-template, org-texinfo-clock, org-texinfo-drawer,
org-texinfo-link, org-texinfo-plain-list, org-texinfo-planning,
org-texinfo-table, org-texinfo-table-cell, org-texinfo-timestamp): Use
options instead of variable names.

(org-texinfo-format-headline-default-function,
org-texinfo-format-inlinetask-default-function): New functions.
(org-texinfo-headline, org-texinfo-inlinetask): Use new functions.
2014-07-29 15:45:18 +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
Nicolas Goaziou 7a8de7d1e3 ox-beamer: Remove `org-beamer-insert-options-template'
* lisp/ox-beamer.el (beamer): Re-order keywords.
(org-beamer-insert-options-template): Remove function.

* doc/org.texi (Beamer export): Remove reference to the previous
  function.

Use the generic insertion mechanism provided in "ox.el"
instead (`org-export-insert-default-template') in order to avoid code
duplication.
2014-06-15 10:26:40 +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 bf47838d77 Merge branch 'maint' 2014-05-19 13:39:06 +02:00
Nicolas Goaziou 5b43ea1cd7 ox-beamer: Fix environment selection wrt persistent tags
* lisp/ox-beamer.el (org-beamer-select-environment): Ignore persistent
  tags when displaying environments.

Thanks to Anders Johansson for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86441
2014-05-19 13:37:16 +02: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
Nicolas Goaziou 09ee2336ef Merge branch 'maint' 2014-03-24 13:59:44 +01:00
Nicolas Goaziou 33dce5b98f Fix LaTeX and Beamer publishing process
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Ensure ".tex" file is
  generated in the same directory as the ".org" file.

Thanks to Rafael for reporting it.  See
http://permalink.gmane.org/gmane.emacs.orgmode/84095.
2014-03-24 13:58:25 +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