export back-ends: Remove useless pub-dir argument from export commands

* contrib/lisp/org-e-ascii.el (org-e-ascii-export-to-ascii): Remove
  pub-dir argument.
* contrib/lisp/org-e-beamer.el (org-e-beamer-export-to-latex,
  org-e-beamer-export-to-pdf): Remove pub-dir argument.
* contrib/lisp/org-e-groff.el (org-e-groff-export-to-groff,
  org-e-groff-export-to-pdf): Remove pub-dir argument.
* contrib/lisp/org-e-html.el (org-e-html-export-to-html): Remove
  pub-dir argument.
* contrib/lisp/org-e-latex.el (org-e-latex-export-to-latex,
  org-e-latex-export-to-pdf): Remove pub-dir argument.
* contrib/lisp/org-e-man.el (org-e-man-export-to-man,
  org-e-man-export-to-pdf): Remove pub-dir argument.
* contrib/lisp/org-e-odt.el (org-e-odt-export-to-odt): Remove pub-dir
  argument.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-export-to-texinfo,
  org-e-texinfo-export-to-info): Remove pub-dir argument.
* contrib/lisp/org-koma-letter.el (org-koma-letter-export-to-latex,
  org-koma-letter-export-to-pdf): Remove pub-dir argument.
* contrib/lisp/org-md.el (org-md-export-to-markdown): Remove pub-dir
  argument.

Publishing mechansim does not call any export command. It only relies
on `org-export-file-name' and `org-export-to-file'.  Only the former
has to support a pub-dir argument.
This commit is contained in:
Nicolas Goaziou 2012-11-29 21:52:43 +01:00
parent 07f4d867e5
commit 496ed832d8
10 changed files with 32 additions and 80 deletions

View File

@ -1815,7 +1815,7 @@ is non-nil."
;;;###autoload
(defun org-e-ascii-export-to-ascii
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a text file.
If narrowing is active in the current buffer, only export its
@ -1837,12 +1837,9 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".txt" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".txt" subtreep)))
(org-export-to-file
'e-ascii outfile subtreep visible-only body-only ext-plist)))

View File

@ -1015,7 +1015,7 @@ is non-nil."
;;;###autoload
(defun org-e-beamer-export-to-latex
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer as a Beamer presentation (tex).
If narrowing is active in the current buffer, only export its
@ -1037,18 +1037,15 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file
'e-beamer outfile subtreep visible-only body-only ext-plist)))
;;;###autoload
(defun org-e-beamer-export-to-pdf
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer as a Beamer presentation (PDF).
If narrowing is active in the current buffer, only export its
@ -1070,14 +1067,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return PDF file's name."
(interactive)
(org-e-latex-compile
(org-e-beamer-export-to-latex
subtreep visible-only body-only ext-plist pub-dir)))
(org-e-beamer-export-to-latex subtreep visible-only body-only ext-plist)))
;;;###autoload
(defun org-e-beamer-select-environment ()

View File

@ -1886,7 +1886,7 @@ contextual information."
;;; Interactive functions
(defun org-e-groff-export-to-groff
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a Groff file.
If narrowing is active in the current buffer, only export its
@ -1905,19 +1905,16 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(setq org-e-groff-registered-references nil)
(setq org-e-groff-special-content nil)
(let ((outfile (org-export-output-file-name ".groff" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".groff" subtreep)))
(org-export-to-file
'e-groff outfile subtreep visible-only body-only ext-plist)))
(defun org-e-groff-export-to-pdf
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to Groff then process through to PDF.
If narrowing is active in the current buffer, only export its
@ -1936,14 +1933,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return PDF file's name."
(interactive)
(org-e-groff-compile
(org-e-groff-export-to-groff
subtreep visible-only body-only ext-plist pub-dir)))
(org-e-groff-export-to-groff subtreep visible-only body-only ext-plist)))
(defun org-e-groff-compile (file)
"Compile a Groff file.

View File

@ -2803,7 +2803,7 @@ is non-nil."
;;;###autoload
(defun org-e-html-export-to-html
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a HTML file.
If narrowing is active in the current buffer, only export its
@ -2825,13 +2825,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let* ((extension (concat "." org-e-html-extension))
(file (org-export-output-file-name extension subtreep pub-dir))
(file (org-export-output-file-name extension subtreep))
(org-export-coding-system org-e-html-coding-system))
(org-export-to-file
'e-html file subtreep visible-only body-only ext-plist)))

View File

@ -2674,7 +2674,7 @@ is non-nil."
;;;###autoload
(defun org-e-latex-export-to-latex
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a LaTeX file.
If narrowing is active in the current buffer, only export its
@ -2696,18 +2696,15 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file
'e-latex outfile subtreep visible-only body-only ext-plist)))
;;;###autoload
(defun org-e-latex-export-to-pdf
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to LaTeX then process through to PDF.
If narrowing is active in the current buffer, only export its
@ -2729,14 +2726,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return PDF file's name."
(interactive)
(org-e-latex-compile
(org-e-latex-export-to-latex
subtreep visible-only body-only ext-plist pub-dir)))
(org-e-latex-export-to-latex subtreep visible-only body-only ext-plist)))
(defun org-e-latex-compile (texfile)
"Compile a TeX file.

View File

@ -1146,7 +1146,7 @@ contextual information."
;;; Interactive functions
(defun org-e-man-export-to-man
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a Man file.
If narrowing is active in the current buffer, only export its
@ -1168,17 +1168,14 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".man" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".man" subtreep)))
(org-export-to-file
'e-man outfile subtreep visible-only body-only ext-plist)))
(defun org-e-man-export-to-pdf
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to Groff then process through to PDF.
If narrowing is active in the current buffer, only export its
@ -1200,14 +1197,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return PDF file's name."
(interactive)
(org-e-man-compile
(org-e-man-export-to-man
subtreep visible-only body-only ext-plist pub-dir)))
(org-e-man-export-to-man subtreep visible-only body-only ext-plist)))
(defun org-e-man-compile (file)
"Compile a Groff file.

View File

@ -3829,7 +3829,7 @@ formula file."
;;;###autoload
(defun org-e-odt-export-to-odt
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a HTML file.
If narrowing is active in the current buffer, only export its
@ -3851,13 +3851,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(org-e-odt--export-wrap
(org-export-output-file-name ".odt" subtreep pub-dir)
(org-export-output-file-name ".odt" subtreep)
(let* ((org-e-odt-embedded-images-count 0)
(org-e-odt-embedded-formulas-count 0)
(org-e-odt-automatic-styles nil)

View File

@ -1643,7 +1643,7 @@ contextual information."
;;; Interactive functions
(defun org-e-texinfo-export-to-texinfo
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to a Texinfo file.
If narrowing is active in the current buffer, only export its
@ -1665,17 +1665,14 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".texi" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".texi" subtreep)))
(org-export-to-file
'e-texinfo outfile subtreep visible-only body-only ext-plist)))
(defun org-e-texinfo-export-to-info
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer to Texinfo then process through to INFO.
If narrowing is active in the current buffer, only export its
@ -1703,8 +1700,7 @@ directory.
Return INFO file's name."
(interactive)
(org-e-texinfo-compile
(org-e-texinfo-export-to-texinfo
subtreep visible-only body-only ext-plist pub-dir)))
(org-e-texinfo-export-to-texinfo subtreep visible-only body-only ext-plist)))
(defun org-e-texinfo-compile (file)
"Compile a texinfo file.

View File

@ -263,7 +263,7 @@ non-nil."
;;;###autoload
(defun org-koma-letter-export-to-latex
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer as a KOMA Scrlttr2 letter (tex).
If narrowing is active in the current buffer, only export its
@ -290,13 +290,13 @@ directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file
'koma-letter outfile subtreep visible-only body-only ext-plist)))
;;;###autoload
(defun org-koma-letter-export-to-pdf
(&optional subtreep visible-only body-only ext-plist pub-dir)
(&optional subtreep visible-only body-only ext-plist)
"Export current buffer as a KOMA Scrlttr2 letter (pdf).
If narrowing is active in the current buffer, only export its
@ -318,14 +318,10 @@ EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return PDF file's name."
(interactive)
(org-e-latex-compile
(org-koma-letter-export-to-latex
subtreep visible-only body-only ext-plist pub-dir)))
(org-koma-letter-export-to-latex subtreep visible-only body-only ext-plist)))
(provide 'org-koma-letter)
;;; org-koma-letter.el ends here

View File

@ -435,7 +435,7 @@ non-nil."
;;;###autoload
(defun org-md-export-to-markdown (&optional subtreep visible-only pub-dir)
(defun org-md-export-to-markdown (&optional subtreep visible-only)
"Export current buffer to a Markdown file.
If narrowing is active in the current buffer, only export its
@ -450,12 +450,9 @@ first.
When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.
When optional argument PUB-DIR is set, use it as the publishing
directory.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".md" subtreep pub-dir)))
(let ((outfile (org-export-output-file-name ".md" subtreep)))
(org-export-to-file 'md outfile subtreep visible-only)))