Commit Graph

178 Commits

Author SHA1 Message Date
Leslie H. Watter d4a4fc740e ox.el: Add pt_BR translations to export engine
* lisp/ox.el: (org-export-dictionary) Add pt_BR messages to the list.

TINYCHANGE
2014-11-06 23:47:28 +01:00
Nicolas Goaziou a0ac1344fc ox: Fix 88457acff4
* lisp/ox.el (org-export-async-start): Limit first argument to lambda
  expressions.
* lisp/ox-publish.el (org-publish, org-publish-all,
  org-publish-current-file): Replace `ignore', per limit stated above.

Due to a hack allowing to provide quasi-quoted lambda expressions,
symbols are not allowed as result handler.  This limitation is not
much of a problem as `org-export-async-start' is only meant to be used
internally.
2014-10-12 22:53:01 +02:00
Nicolas Goaziou 88457acff4 ox: Fix "void-variable ignore" error when publishing
* lisp/ox.el (org-export-async-start): Allow to use symbols as
  function.

Thanks to Julien Cubizolles for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/91532
2014-10-10 11:05:06 +02:00
Kyle Meyer 4f81b8cac0 ox.el: Fix typo in documentation
* lisp/ox.el (org-export-show-temporary-export-buffer): Fix typo.

TINYCHANGE
2014-09-26 11:11:02 +02:00
Nicolas Goaziou 7c48bdd7a8 Revert "ox: Implement predicate for export blocks"
This reverts commit 2160b3d242.
2014-09-08 12:09:52 +02:00
Nicolas Goaziou 9f9aa52f14 ox: Provide output file name, if any, to back-ends
* lisp/ox.el (org-export-to-file): Provide output file name in
  communication channel, through :output-file property.

This change is needed to fix back-ends needing this information during
the process, e.g., `texinfo'.
2014-08-07 00:00:19 +02:00
Nicolas Goaziou 2160b3d242 ox: Implement predicate for export blocks
* lisp/ox.el (org-export-raw-special-block-p): New function.

* testing/lisp/test-ox.el (test-org-export/raw-special-block-p): New
  test.

This patch is a forward-compatibility measure since the function is
mandatory for export back-ends in Org 8.3. It makes it easier for
back-end maintainers to provide a back-end compatible with both Org
8.2 and 8.3.
2014-07-27 14:25:44 +02:00
Nicolas Goaziou 0fbc4893ed ox: Fix priority bug in :title property
* lisp/ox.el (org-export--get-inbuffer-options): Return the empty
  string instead of nil when TITLE keywords has no value.
(org-export--get-buffer-attributes): Do not set :title property
early.
(org-export--get-global-options): Do not ignore anymore nil values.
Small refactoring.
(org-export-as): Correctly set :title here.

Thanks to Nicolas Richard for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/87149
2014-06-03 22:07:35 +02:00
Achim Gratz 6c1b41bd68 org, ox: move defsubst before first use
* lisp/ox.el (org-export-get-parent): Move definition of
  'org-export-get-parent' before first use.  Leave comment at original
  place of definition.

* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
  first use.  Leave comment at original place of definition.
2014-05-28 13:44:53 +02:00
Nicolas Goaziou e242bc5180 ox: Fix Wrong type argument error with empty footnotes
* lisp/ox.el (org-export-data): Always return a string, as specified
  by the docstring.

Thanks to kuanyui for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86183
2014-05-12 22:18:00 +02:00
Nicolas Goaziou b983048b73 Small documentation improvements
* doc/org.texi (The Export Dispatcher): Reformulation.
* lisp/ox.el (org-export-copy-to-kill-ring): Comply to docstrings
  standards.
2014-04-21 09:48:17 +02:00
Bastien Guerry f4715f1652 ox.el (org-export--get-subtree-options): Fix bug
* ox.el (org-export--get-subtree-options): When using the
headline as a title for a subtree export, only take the true
heading, no TODO keyword, no priority cookie, no tag.

Thanks to Robert Klein for reporting this.
2014-01-19 16:37:25 +01:00
Nicolas Goaziou b0ac2f6ac0 ox: Remove clutter from export templates
* lisp/ox.el (org-export-insert-default-template): Only insert
  keywords and options relatives to the selected back-end.  Ignore
  those relatives to its parent in the case of a derived back-end.
2014-01-17 22:16:41 +01:00
Bastien Guerry 9305b41ceb Backport typo fixes from Emacs revno 115988 2014-01-12 09:54:21 +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 8bb519d934 Fix defcustoms: don't quote const values.
* ob-latex.el (org-babel-latex-htlatex-packages): Use repeat
instead of list as the defcustom type.

* ox.el (org-export-with-creator):
* org.el (org-loop-over-headlines-in-active-region)
(org-mouse-1-follows-link, org-provide-todo-statistics):
* org-agenda.el (org-agenda-custom-commands-local-options)
(org-agenda-start-with-log-mode)
(org-agenda-show-inherited-tags): Don't quote const values.

Thanks to Glenn Morris for reporting this.
2013-12-30 10:30:44 +01:00
Nicolas Goaziou 4ee7e60405 ox: Fix smart quote detection
* lisp/ox.el (org-export-smart-quotes-regexps): Fix smart quote
  detection when it is followed by an open parenthesis syntax class.
2013-12-26 12:35:59 +01:00
Bastien Guerry 8e00dbb00b ox.el (org-export-to-file): Fix typo in docstring
* ox.el (org-export-to-file): Fix typo in docstring.
2013-12-18 16:00:05 +01:00
Bastien Guerry a6210cc9c2 Backport Paul's fixes from Emacs trunk (1/2)
See http://article.gmane.org/gmane.emacs.diffs/123123
2013-11-17 09:12:41 +01:00
Bastien Guerry a3d7cdcd9e Fix version for org-(export-with|use)-sub-superscript
* ox.el (org-export-with-sub-superscripts):
* org.el (org-use-sub-superscripts): Fix version and enhance
docstring again.
2013-11-17 08:46:50 +01:00
Bastien Guerry 0a6b6bf735 Enhance docstrings
* ox.el (org-export-with-sub-superscripts):
* org.el (org-use-sub-superscripts): Enhance docstrings.

Thansk to Dieter and Nick for raising this.
2013-11-15 10:08:25 +01:00
Bastien Guerry 22a061f575 Partially revert commit adcebf
* ox.el (org-export-async-init-file):
* ox-odt.el (org-odt-with-latex):
* ox-html.el (org-html-with-latex):
* org.el (org-return-follows-link):
* ob-python.el (org-babel-python-command): Don't use :set.

Thanks to Glenn Morris for pointing at this.
2013-11-15 06:22:36 +01:00
Bastien Guerry adcebf38f8 Fix errors reported by cus-test.el
* ox.el (org-export-async-init-file): Use :set to set the
default value.

* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value.  Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.

* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value.  Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.

* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.

* ox-html.el (org-html-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.

* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.

* org.el (org-mouse-1-follows-link): Use :set to set the
default value.  Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value.  Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement.  Assume
`orgstruct-heading-prefix-regexp' is a string.

* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0.  Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.

* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.

* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.

* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.

* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.

Thanks to Glenn Morris for reporting this.
2013-11-14 14:05:18 +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 6cc028bf74 ox: Fix next/previous element getters
* lisp/ox.el (org-export-get-previous-element,
  org-export-get-next-element): Fix return value for non plain text
  objects in a secondary string.
* testing/lisp/test-ox.el: Add tests.
2013-11-11 01:54:01 +01:00
Nicolas Goaziou d7379053c0 ox: Fix OPTIONS in default template
* lisp/ox.el (org-export-insert-default-template): Make sure strings
  are properly quoted when inserting a template.  Specifically,
  default value for drawers should be d:(not "LOGBOOK"), not d:(not
  LOGBOOK).
2013-11-03 11:35:31 +01:00
Nicolas Goaziou 58b157956c ox: Fix `org-export-with-backend'
* lisp/ox.el (org-export-with-backend): Ensure function will use
  provided back-end.
* testing/lisp/test-ox.el: Add test.
2013-10-07 16:58:20 +02:00
Nicolas Goaziou 580b7fce95 Merge branch 'maint' 2013-08-31 14:34:37 +02:00
Nicolas Goaziou 22b4473fcc ox: Do not build TOC for headlines below H value
* lisp/ox.el (org-export-collect-headlines): Do not build TOC for
  headlines below H value.
* testing/lisp/test-ox.el: Add test.

Reported-by: Jambunathan K <kjambunathan@gmail.com>
2013-08-31 14:30:25 +02:00
Nicolas Goaziou eaa458594f Merge branch 'maint' 2013-08-29 10:43:19 +02:00
Nicolas Goaziou 180d112334 ox: Fix void `org-table-number-fraction'
* lisp/ox.el (org-export-table-cell-alignment): Ensure required
  variables are available.

This error is triggered in ODT export with lists using :list-table
feature.  This creates tables as parsed data on the fly in the tree,
triggering call to `org-export-table-cell-alignment', but `org-table'
library may not be available.
2013-08-29 10:38:15 +02:00
Nicolas Goaziou 39384cc157 ox: Fix 8c833ed9fb
* lisp/ox.el (org-export-table-cell-alignment): Use correct :test.
  See 2baa2c3afa.
2013-08-29 10:37:53 +02:00
Nicolas Goaziou 754a72eb2a Merge branch 'maint' 2013-08-29 10:22:09 +02:00
Nicolas Goaziou 8c833ed9fb ox: Fix stack overflow in equal error (part 2)
* lisp/ox.el (org-export-table-cell-alignment): Apply the same changes
  as in 2baa2c3afa.
2013-08-29 10:17:09 +02:00
Nicolas Goaziou 718e1ec3c4 Merge branch 'maint' 2013-08-29 10:08:24 +02:00
Nicolas Goaziou 2baa2c3afa ox: Fix stack overflow in equal error
* lisp/ox.el (org-export-table-cell-width): Modify key (now an
  element) and value structure (now a vector) of cache so it can use
  `eq' as test. Elements are circular lists so `equal' cannot apply on
  them.

Reported-by: Jambunathan K <kjambunathan@gmail.com>
2013-08-29 10:04:22 +02:00
Nicolas Goaziou e7c8872005 ox: Fix docstrings
* lisp/ox.el (org-export-to-buffer, org-export-to-file): Fix
  docstrings.
2013-08-27 10:32:59 +02:00
Nicolas Goaziou cf8cc35ec5 ox: Fix test errors
* lisp/ox.el (org-export-data-with-backend): Set temporary back-end as
  the new back-end in local communication channel.
(org-export-filter-apply-functions): Handle corner case where back-end
is nil.
* testing/lisp/test-ox.el: Small refactoring.
2013-08-12 10:42:05 +02:00
Nicolas Goaziou 73b060b768 ox: Only provide back-end name as second argument of filters
* lisp/ox.el (org-export-filter-apply-functions): Only provide
  back-end name (a symbol) as second argument of filters, not the full
  back-end (a vector).
2013-08-10 09:42:20 +02:00
Nicolas Goaziou ef2d475bf8 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-08-08 18:49:17 +02:00
Nicolas Goaziou c82cb4f75e ox-publish: Correctly return document title
* lisp/ox-publish.el (org-publish-find-title): Fix title when no
  #+TITLE property is provided.
* lisp/ox.el (org-export-store-default-title): Remove-function.
(org-export--default-title): Remove variable.
(org-export-options-alist): Do not use a default value.
(org-export--get-buffer-attributes): Store a default title.
(org-export-as): Apply function removal.
(org-export--get-global-options): Do not set a property with an
explicitely nil value.
2013-08-08 18:45:39 +02:00
Nicolas Goaziou 6f55864f20 ox: Add arguments to `org-export-to-file' and `org-export-to-buffer'
* lisp/ox.el (org-export-to-buffer): Add two arguments: one to trigger
  asynchronous export and the other to do extra processing from within
  the buffer.
(org-export-to-file): Add two arguments: one to trigger asynchronous
  export and the other to do extra processing on the output file.
(org-export-async-start): Small clean up.
2013-08-07 16:10:38 +02:00
Nicolas Goaziou d1d918100e ox: Fix f5161671ce
* lisp/ox.el (org-export-as): Use new back-end structure.
2013-08-03 09:46:58 +02:00
Nicolas Goaziou b95d7842f2 Merge branch 'maint' 2013-08-03 09:45:42 +02:00
Nicolas Goaziou f5161671ce ox: Re-introduce `org-export-current-backend' for compatibility
* lisp/ox.el (org-export-current-backend): New variable.
(org-export-as): Use new variable.

Thanks to Christophe Rhodes for providing a preliminary patch.
2013-08-03 09:44:34 +02:00
Nicolas Goaziou a3375f3432 Merge branch 'maint' 2013-07-31 14:45:09 +02:00
Nicolas Goaziou cc10c80d85 ox: Preserve coding system when writing output to a file
* lisp/ox.el (org-export-to-file): Preserve coding system when writing
  output.
2013-07-31 14:44:33 +02:00
Nicolas Goaziou d73ff5fd61 Merge branch 'maint' 2013-07-28 21:40:37 +02:00