summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-10-26 15:05:10 +0200
committerBastien Guerry <bzg@altern.org>2012-10-26 15:05:10 +0200
commit7a9d3457073ce60670d0d0a02cbfcb9c34e9794b (patch)
tree9c7e3cb902e9b0d332b176a2cab8f0c8fb7e232e
parent116c09053faaf603cf8541d5776abfb1247d9de3 (diff)
downloadorg-mode-7a9d3457073ce60670d0d0a02cbfcb9c34e9794b.tar.gz
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'.
-rw-r--r--lisp/ob-haskell.el2
-rw-r--r--lisp/org-latex.el32
2 files changed, 15 insertions, 19 deletions
diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el
index 7f43faf..03972ef 100644
--- a/lisp/ob-haskell.el
+++ b/lisp/ob-haskell.el
@@ -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
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index d7d18ca..9ce84f1 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -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"))