Commit Graph

51 Commits

Author SHA1 Message Date
Kyle Meyer 6f9184a294 Merge branch 'maint' into backport-master 2015-07-26 23:56:50 -04:00
Kyle Meyer c115c7b4e8 org-compat: Use different font-lock-ensure alias
* lisp/org-compat.el (org-font-lock-ensure): Remove in favor of
  font-lock-ensure alias from dcbaebc.

Instead of org-font-lock-ensure alias introduced in dcbaebc ("Backport
commit 6711a21 from Emacs master branch", 2014-05-28), use
font-lock-ensure alias added in e6883dd ("org-compat: Provide
compatibility definition for font-lock-ensure", 2014-06-01).
2015-07-26 23:29:14 -04:00
Stefan Monnier d81e6b52b7 Backport commit 6711a21 from Emacs master branch
* lisp/org-compat.el (org-font-lock-ensure): New function.
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-html.el (org-html-fontify-code):
* lisp/org.el (org-fontify-like-in-org-mode):
* lisp/org-src.el (org-src-font-lock-fontify-block):
* lisp/org-clock.el (org-clock-get-clocktable): Use it.
* lisp/ox-org.el (org-org-publish-to-org):
Use it. Avoid using find-file from Elisp.

6711a21f1125c0047c56eb266eb374c1ec90a967
Stefan Monnier
Wed May 28 23:45:29 2014 -0400
2015-07-26 23:28:25 -04:00
Rasmus 564673b766 ox-org: Remove #+DESCRIPTION and #+KEYWORD support
* ox-org.el (org-org-keyword): Remove #+KEYWORD and #+DESCRIPTION
  (org-org-template): Remove explicit #+KEYWORD and #+DESCRIPTION
  support.
2015-03-29 15:00:33 +02:00
Nicolas Goaziou a0f2293405 Remove comment related translators in export back-ends
* lisp/ox-ascii.el (ascii):
* lisp/ox-latex.el (latex):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-org.el (org):
* lisp/ox-texinfo.el (texinfo):

* contrib/lisp/ox-groff.el (groff): Remove `comment' and
`comment-block' translators.

`comment' and `comment-block' translators are not needed since both
commented lines and comment blocks do not appear anymore in the parse
tree.  See 69dd4301ab.
2015-03-28 10:56:11 +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
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 f7a1e23d20 ox-org: Allow custom export for links
* lisp/ox-org.el (org-org-link): New function.

This patch allows to handle `org' export format in EXPORT argument
from `org-add-link-type'.

Suggested-by: John Kitchin <johnrkitchin@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94439>
2015-01-29 19:31:03 +01:00
Nicolas Goaziou fe133aadca ox-org: Update wrt `org-element-block-name-alist' change
* lisp/ox-org.el (org-org-keyword): Do not check for keywords
  targeting other export back-ends since
  `org-element-block-name-alist' doesn't contain such information
  anymore.
2014-08-08 10:34:34 +02:00
Nicolas Goaziou c7a2024f65 ox-org: OPTIONS keyword belong to the template
* lisp/ox-org.el (org-org-keyword): Do not handle OPTIONS keywords
  since those are handled in the template.
(org-org-template): Handle OPTIONS keyword.

As a consequence, OPTIONS keyword do not appear anymore when doing
a body-only export.

Thanks to Thorsten Jolitz for suggesting the idea.
http://permalink.gmane.org/gmane.emacs.orgmode/89633
2014-08-08 10:29:59 +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 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 2e370ed537 Merge branch 'maint' 2014-05-21 21:30:38 +02:00
Nicolas Goaziou bc456879ff ox-org: Tiny refactoring
* lisp/ox-org.el (org-org-section): Tiny refactoring.  Use appropriate
  property.
2014-05-21 21:29:16 +02:00
Nicolas Goaziou c40833436c Merge branch 'maint' 2014-05-21 18:38:11 +02:00
Nicolas Goaziou 844a6494c3 ox-org: Fix missing footnote definitions
* lisp/ox-org.el (org-org-headline): Ignore footnote sections.
(org-org-section): New function.

Some footnote definitions may be outside of the scope of the export
and, therefore, do not appear in the generated output.  This patch
ensures that all footnote definitions appear at the end of the section
they belong to.

Thanks to Leonard Randall for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86558
2014-05-21 18:37:13 +02: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
Bastien Guerry f8e1745440 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +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 c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +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 d55f0632b5 Merge branch 'maint' 2013-12-15 16:18:31 +01:00
Nicolas Goaziou 29c02c3810 ox-org: Remove attr_backend keywords
* lisp/ox-org.el (org-org-identity): Since back-end specific keywords
  are stripped from output, also remove attr_backend keywords.
2013-12-15 15:17:24 +01:00
Nicolas Goaziou 4e02e48fa3 Merge branch 'maint'
Conflicts:
	doc/org.texi
2013-12-15 14:59:33 +01:00
Nicolas Goaziou 18d3057e62 org.texi: Document `org' back-end
* doc/org.texi (Org export): New section.
* lisp/ox-org.el: Remove initial code comments since this is now in
  manual.
2013-12-15 14:52:46 +01:00
Nicolas Goaziou 9676c59547 ox-org: Add "body-only" export
* lisp/ox-org.el (org-org-export-to-org): Add body-only export.
2013-11-16 09:19:22 +01:00
Nicolas Goaziou 38a2bd3783 ox-org: Improve keyword handling
* lisp/ox-org.el (org-org-template): New function.
(org-org-keyword): Handle document keywords specially.
2013-11-16 00:20:13 +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 92f89eedba ox-org: Fix headline level during subtree export
* lisp/org-element.el (org-element-headline-interpreter): Take into
  consideration `org-odd-levels-only' when building a headline.
* lisp/ox-org.el (org-org-headline): Correctly set transcoded headline
  level during subtree export.
2013-11-06 19:14:14 +01:00
Bastien Guerry c1ea2c3df9 ox-org.el: Show all headings and all blocks before fontifying when htmlizing sources
* ox-org.el (org-org-publish-to-org): When htmlizing an .org
file, ensure to show all headings and all blocks before
fontifying.
2013-10-14 10:05:30 +02:00
Nicolas Goaziou c2fa90248c ox-org: Fix arguments mismatch in `org-export-as-org'
* lisp/ox-org.el (org-export-as-org): Add missing BODY-ONLY argument,
which is always nil in this back-end.

Reported-by: Nicolas Girard <girard.nicolas@gmail.com>
2013-08-23 09:32:35 +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 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 58f7e43821 ox-org.el: Fix some docstrings
* lisp/ox-org.el (org-org-identity): Fix docstring.  Tiny refactoring.
(org-org-headline, org-org-keyword): Fix docstring.
2013-04-17 22:45:07 +02:00
Nicolas Goaziou 3d65b46c0c ox-org: Add interactive functions to back-end
* lisp/ox-org.el (org): Add a menu entry for the back-end.
(org-org-export-as-org, org-org-export-to-org): New functions.
* lisp/org.el (org-export-backends): Accept `org' as a loadable
  back-end.
2013-04-04 15:09:22 +02:00
Bastien Guerry a597a8b622 ox-html.el and ox-org.el: Use the custom HTML extension.
* ox-org.el (org-org-publish-to-org):
* ox-html.el (org-html-publish-to-html): Use the custom
extension.

Thanks to Ian Barton for reporting this.
2013-04-03 13:25:11 +02:00
Bastien Guerry a13b19e384 ox.el (org-export-define-backend, org-export-define-derived-backend): Use defuns
* ox.el (org-export-define-backend)
(org-export-define-derived-backend): Make defuns and update
docstrings.

* ox-texinfo.el (texinfo):
* ox-org.el (org):
* ox-odt.el (odt):
* ox-md.el (md):
* ox-man.el (man):
* ox-latex.el (latex):
* ox-icalendar.el (icalendar):
* ox-html.el (html):
* ox-beamer.el (beamer):
* ox-ascii.el (ascii): Use the defuns.
2013-03-19 19:39:34 +01:00
Bastien Guerry f5bf08c92c ox-org.el (org-org-publish-to-org): Kill buffers not visited at publication time
* ox-org.el (org-org-publish-to-org): Kill buffers not visited
at publication time.
2013-03-19 19:38:52 +01:00
Bastien Guerry 952100a8a1 Fix typo 2013-03-04 07:36:54 +01:00
Nicolas Goaziou 25f2ae88f5 ox-org: Silence byte-compiler 2013-03-02 19:31:12 +01:00
Bastien Guerry 4351dda5ab ox-org.el: Handle :htmlized-source in publishing projects
* ox-org.el (org-org-htmlized-css-url): Rename from
`org-html-htmlized-org-css-url' and moved here from
ox-html.el.
(org-org-publish-to-org): Handle :htmlized-source in
publishing projects.
2013-03-02 18:46:07 +01:00
Bastien Guerry e9e32173cc Update headers. 2013-02-23 09:56:24 +01:00
Bastien Guerry e4a8f7b8c1 ox-org.el (org-org-publish-to-org): Autoload
* ox-org.el (org-org-publish-to-org): Autoload.
2013-02-22 13:42:02 +01:00
Nicolas Goaziou 61bf4a5c3f export back-ends: Preserve subsequent blank lines when ignoring comments
* lisp/ox-latex.el (org-latex-property-drawer): Remove function.
* contrib/lisp/ox-groff.el (org-groff-property-drawer): Remove
  function.

This changes ensures that:

  paragraph
  # comment

  another paragraph

will be exported as:

  paragraph

  another paragraph

and not as:

  paragraph
  another paragraph

It only applies on back-end where empty lines are meaningful (e.g. not
html).
2013-02-22 11:43:38 +01:00
Bastien Guerry bfa648be7d ox-org.el (org-org-publish-to-org): New defun
* ox-org.el (org-org-publish-to-org): New defun.
2013-02-19 19:17:20 +01:00