Commit Graph

69 Commits

Author SHA1 Message Date
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
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 96fe2dec3b Merge branch 'maint' 2014-02-25 17:43:05 +01:00
Nicolas Goaziou 0d7b052cfa ox-beamer: Fix export snippets in sublists
* lisp/ox-beamer.el (org-beamer-item): Insert the export snippet right
  after the first \item, not all of them.

Thanks to Andreas Leha for reporting it.
2014-02-25 17:41:33 +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
Nicolas Goaziou 1e25d087dd ox-beamer: Small clean-up
* lisp/ox-beamer.el: Remove unnecessary package definitions in default
  class.
2014-01-17 12:44:05 +01:00
Nicolas Goaziou fc09ad3be4 ox-beamer: Fix bug when an selecting environment
* lisp/ox-beamer.el (org-beamer-select-environment): Function doesn't
  work if fast tag selection is disabled, so make sure it is always
  on, independently on user's configuration.

Reported-by: Anders Johansson <mejlaandersj@gmail.com>
2014-01-07 21:50:44 +01:00
Bastien Guerry 7d9a883b50 Update copyright years again.
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Bastien Guerry f95641c443 Backport changes from Emacs revs 115081 and 115082
2013-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	Address some byte-compiler warnings.
	* ob-abc.el (org-babel-expand-body:abc): Use dolist.
	(org-babel-execute:abc): Fix regexp quoting.
	* ob-calc.el (org--var-syms): Rename from `var-syms'.
	* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
	* ob-table.el (sbe): Move debug declaration.
	* org-clock.el (org--msg-extra): Rename from `msg-extra'.
	* org.el (org-version): Avoid var name starting with _.
	(org-inhibit-startup, org-called-with-limited-levels)
	(org-link-search-inhibit-query, org-time-was-given)
	(org-end-time-was-given, org-def, org-defdecode, org-with-time):
	* org-colview.el (org-agenda-overriding-columns-format):
	* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
	(org-agenda-show-log-scoped):
	* ob-python.el (py-which-bufname, python-shell-buffer-name):
	* ob-haskell.el (org-export-copy-to-kill-ring):
	* ob-exp.el (org-link-search-inhibit-query):
	* ob-R.el (ess-eval-visibly-p):
	* ob-core.el (org-src-window-setup): Declare before use.
	(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
	* ox-odt.el (org-odt-hfy-face-to-css):
	* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
	* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
	(org-bibtex-check):
	* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
	(org-babel-tangle-single-block, org-babel-tangle-comment-links):
	* ob-table.el (sbe):
	* ob-sqlite.el (org-babel-sqlite-expand-vars):
	* ob-sql.el (org-babel-sql-expand-vars):
	* ob-shen.el (org-babel-execute:shen):
	* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
	* ob-scala.el (org-babel-scala-evaluate):
	* ob-ruby.el (org-babel-ruby-table-or-string)
	(org-babel-ruby-evaluate):
	* ob-python.el (org-babel-python-table-or-string)
	(org-babel-python-evaluate-external-process)
	(org-babel-python-evaluate-session):
	* ob-picolisp.el (org-babel-execute:picolisp):
	* ob-perl.el (org-babel-perl-evaluate):
	* ob-maxima.el (org-babel-execute:maxima):
	* ob-lisp.el (org-babel-execute:lisp):
	* ob-java.el (org-babel-execute:java):
	* ob-io.el (org-babel-io-evaluate):
	* ob-haskell.el (org-babel-execute:haskell):
	* ob-fortran.el (org-babel-execute:fortran):
	* ob-exp.el (org-babel-exp-code):
	* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
	* ob-ditaa.el (org-babel-execute:ditaa):
	* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
	(org-babel-parse-header-arguments, org-babel-reassemble-table)
	(org-babel-goto-src-block-head, org-babel-mark-block)
	(org-babel-expand-noweb-references, org-babel-script-escape)
	(org-babel-process-file-name):
	* ob-clojure.el (org-babel-execute:clojure):
	* ob-calc.el (org-babel-execute:calc):
	* ob-awk.el (org-babel-execute:awk):
	* ob-abc.el (org-babel-execute:abc):
	* ob-R.el (org-babel-expand-body:R):
	* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).

2013-11-12  Glenn Morris  <rgm@gnu.org>

	* ox-html.el (org-html-scripts): Add 2013 to copyright years.
	(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Nicolas Goaziou e5cecc5d34 export back-ends: Remove duplicate information
* lisp/ox-ascii.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-beamer.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-html.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-icalendar.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-md.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
2013-10-20 11:00:05 +02:00
Nicolas Goaziou 655f62dbbb ox-beamer: Fix b67ff6073c
* lisp/ox-beamer.el (org-beamer--format-section): Fix regression
  introduced in b67ff6073c, which would
  prevent frames from being propely exported.
2013-10-07 16:58:25 +02:00
Nicolas Goaziou b67ff6073c ox-beamer: Protect fragile commands in sections
* lisp/ox-beamer.el (org-beamer--format-section): Protect fragile
  commands in sections.
2013-10-04 21:11:49 +02:00
Nicolas Goaziou d745cd1952 ox-beamer: Add a helpful error message
* lisp/ox-beamer.el (org-beamer--format-block): Return an error
  message when using a special environment as a block type.  Also
  check for incomplete environment definitions.
2013-09-29 10:28:15 +02:00
Nicolas Goaziou 9154c70a04 Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
  org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
  org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
  org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
  org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
  org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
  org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
  org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
  org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
  org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
  org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 16:11:42 +02:00
Nicolas Goaziou 44082746da Merge branch 'maint' 2013-07-12 09:19:24 +02:00
Nicolas Goaziou 956837087b ox-beamer: Remove strange indentation in default header
* lisp/ox-beamer.el: Remove strange indentation in default header.
2013-07-12 09:18:47 +02:00
Nicolas Goaziou 0cdf2eb7ce Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-koma-letter.el
2013-07-12 09:10:26 +02:00
Nicolas Goaziou a2a5c8fd5b ox-beamer/latex/koma-letter: Fix missing newlines in header
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Fix
  missing newlines in header.
* lisp/ox-beamer.el (org-beamer-template): Fix missing newlines in
  header.
* lisp/ox-latex.el (org-latex-template): Fix missing newlines in
  header.
2013-07-12 09:07:23 +02:00
Nicolas Goaziou f3168ff90a ox-beamer: Allow to add raw title in environment definition
* lisp/ox-beamer.el (org-beamer-environments-extra): Allow to add raw
  title in environment definition.
(org-beamer--format-block): Handle new placeholders.
2013-06-29 14:35:36 +02:00
Nicolas Goaziou bc8d34541b ox-beamer: Do not ignore uppercase environements
* lisp/ox-beamer.el (org-beamer--frame-level): Small refactoring.
(org-beamer--format-block, org-beamer-headline): Do not systematically
downcase environment names as some require upper case in their
names (e.g. noteNH and CJK).

Thanks to James Harkins for reporting the bug.
2013-04-20 08:32:10 +02:00
Eric Schulte 06294c8dac ox-beamer: Ensure nil is not passed to regexp function
* lisp/ox-beamer.el (org-beamer--format-frame): If contents is nil, then
  replace it with an empty string.
2013-04-14 19:26:01 +02:00
Nicolas Goaziou acc0d01563 ox-beamer: Install a default class set-up when loading library
* lisp/ox-beamer.el (beamer): Install a default class set-up when
  loading library.

This change should provide a meaninfgul export even if user forgot to
set-up `org-latex-classes'.
2013-04-14 11:41:42 +02:00
Nicolas Goaziou e7bf989b28 export back-ends: Handle DATE keyword in a uniform way
* lisp/ox-ascii.el (org-ascii-template--document-title): Use new function.
* lisp/ox-beamer.el (org-beamer-template): Use new function.
* lisp/ox-html.el (org-html-format-spec): Use new function.
* lisp/ox-latex.el (org-latex-template): Use new function.
(org-latex-date-timestamp-format): Remove variable.

The uniform way is to format DATE according to
`org-export-date-timestamp-format' when keyword value consists in
a single timestamp.
2013-04-02 23:59:00 +02:00