1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-27 10:55:04 +00:00

Remove the obsolete argument hidden' from org-export-as-latex'.

* org-latex.el (org-export-as-latex): Remove obsolete argument
`hidden'.  Also fix the docstring: using 'string as the value
for `to-buffer' outputs a string with no LaTeX header.
(org-export-as-latex-batch)
(org-export-as-latex-to-buffer, org-export-region-as-latex)
(org-export-as-pdf): Don't use the obsoleted argument.

* ob-haskell.el (org-export-as-latex): Don't use the obsoleted
argument `hidden'.
This commit is contained in:
Bastien Guerry 2012-10-26 15:05:10 +02:00
parent 116c09053f
commit 7a9d345707
2 changed files with 15 additions and 19 deletions

View File

@ -148,7 +148,7 @@ specifying a variable of the same value."
(defvar org-src-preserve-indentation)
(declare-function org-export-as-latex "org-latex"
(arg &optional hidden ext-plist to-buffer body-only pub-dir))
(arg &optional ext-plist to-buffer body-only pub-dir))
(defun org-babel-haskell-export-to-lhs (&optional arg)
"Export to a .lhs file with all haskell code blocks escaped.
When called with a prefix argument the resulting

View File

@ -787,14 +787,14 @@ emacs --batch
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-latex-batch"
(org-export-as-latex org-export-headline-levels 'hidden))
(org-export-as-latex org-export-headline-levels))
;;;###autoload
(defun org-export-as-latex-to-buffer (arg)
"Call `org-export-as-latex` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-latex'."
(interactive "P")
(org-export-as-latex arg nil nil "*Org LaTeX Export*")
(org-export-as-latex arg nil "*Org LaTeX Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org LaTeX Export*")))
@ -848,7 +848,7 @@ in a window. A non-interactive call will only return the buffer."
(set-mark (point)) ;; to activate the region
(goto-char beg)
(setq rtn (org-export-as-latex
nil nil ext-plist
nil ext-plist
buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
@ -856,21 +856,19 @@ in a window. A non-interactive call will only return the buffer."
rtn)))
;;;###autoload
(defun org-export-as-latex (arg &optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-latex (arg &optional ext-plist to-buffer body-only pub-dir)
"Export current buffer to a LaTeX file.
If there is an active region, export only the region. The prefix
ARG specifies how many levels of the outline should become
headlines. The default is 3. Lower levels will be exported
depending on `org-export-latex-low-levels'. The default is to
convert them as description lists.
HIDDEN is obsolete and does nothing.
EXT-PLIST is a property list with
external parameters overriding org-mode's default settings, but
still inferior to file-local settings. When TO-BUFFER is
non-nil, create a buffer with that name and export to that
buffer. If TO-BUFFER is the symbol `string', don't leave any
buffer behind but just return the resulting LaTeX as a string.
EXT-PLIST is a property list with external parameters overriding
org-mode's default settings, but still inferior to file-local settings.
When TO-BUFFER is non-nil, create a buffer with that name and export
to that buffer. If TO-BUFFER is the symbol `string', don't leave any
buffer behind and just return the resulting LaTeX as a string, with
no LaTeX header.
When BODY-ONLY is set, don't produce the file header and footer,
simply return the content of \\begin{document}...\\end{document},
without even the \\begin{document} and \\end{document} commands.
@ -957,10 +955,9 @@ when PUB-DIR is set, use this as the publishing directory."
(auto-insert nil); Avoid any auto-insert stuff for the new file
(TeX-master (boundp 'TeX-master))
(buffer (if to-buffer
(cond
((eq to-buffer 'string) (get-buffer-create
"*Org LaTeX Export*"))
(t (get-buffer-create to-buffer)))
(if (eq to-buffer 'string)
(get-buffer-create "*Org LaTeX Export*")
(get-buffer-create to-buffer))
(find-file-noselect filename)))
(odd org-odd-levels-only)
(header (org-export-latex-make-header title opt-plist))
@ -1120,8 +1117,7 @@ when PUB-DIR is set, use this as the publishing directory."
(interactive "P")
(message "Exporting to PDF...")
(let* ((wconfig (current-window-configuration))
(lbuf (org-export-as-latex arg hidden ext-plist
to-buffer body-only pub-dir))
(lbuf (org-export-as-latex arg ext-plist to-buffer body-only pub-dir))
(file (buffer-file-name lbuf))
(base (file-name-sans-extension (buffer-file-name lbuf)))
(pdffile (concat base ".pdf"))