summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-12-20 18:54:33 +0100
committerBastien Guerry <bzg@altern.org>2012-12-20 18:54:33 +0100
commit44558f0bbd803e874e2aff77155394ba73bb39f2 (patch)
tree4fcfe4522d1e46fb29f1d06afc44b5201c5b7e52
parent8165be3aa57685ff61471db57f3308caf6e1de94 (diff)
downloadorg-mode-44558f0bbd803e874e2aff77155394ba73bb39f2.tar.gz
Unify the list of args for org-export-as-* functions.
* org-publish.el (org-publish-org-to): Call `org-export-as-*' functions with the correct list of arguments. * org-html.el (org-export-as-html): Delete obsolete arg `hidden'. (org-export-as-html-and-open, org-export-as-html-batch) (org-export-region-as-html): Don't use obsolete arg. * org-ascii.el (org-export-as-ascii): Delete obsolete arg `hidden'. (org-export-as-ascii-to-buffer): Don't use obsolete arg.
-rw-r--r--lisp/org-ascii.el12
-rw-r--r--lisp/org-html.el16
-rw-r--r--lisp/org-publish.el2
3 files changed, 11 insertions, 19 deletions
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index 575b830..67fc4ac 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -131,7 +131,7 @@ utf8 Use all UTF-8 characters")
"Call `org-export-as-ascii` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-ascii'."
(interactive "P")
- (org-export-as-ascii arg nil nil "*Org ASCII Export*")
+ (org-export-as-ascii arg nil "*Org ASCII Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org ASCII Export*")))
@@ -183,23 +183,19 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; to activate the region
(goto-char beg)
- (setq rtn (org-export-as-ascii
- nil nil ext-plist
- buffer body-only))
+ (setq rtn (org-export-as-ascii nil ext-plist buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
rtn)))
;;;###autoload
-(defun org-export-as-ascii (arg &optional hidden ext-plist
- to-buffer body-only pub-dir)
+(defun org-export-as-ascii (arg &optional ext-plist to-buffer body-only pub-dir)
"Export the outline as a pretty ASCII file.
If there is an active region, export only the region.
The prefix ARG specifies how many levels of the outline should become
underlined headlines, default is 3. Lower levels will become bulleted
-lists. When HIDDEN is non-nil, don't display the ASCII buffer.
-EXT-PLIST is a property list with external parameters overriding
+lists. 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
diff --git a/lisp/org-html.el b/lisp/org-html.el
index a6ca2d2..4b7239d 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -793,7 +793,7 @@ 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 become bulleted lists."
(interactive "P")
- (org-export-as-html arg 'hidden)
+ (org-export-as-html arg)
(org-open-file buffer-file-name)
(when org-export-kill-product-buffer-when-displayed
(kill-buffer (current-buffer))))
@@ -806,14 +806,14 @@ emacs --batch
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-html-batch"
- (org-export-as-html org-export-headline-levels 'hidden))
+ (org-export-as-html org-export-headline-levels))
;;;###autoload
(defun org-export-as-html-to-buffer (arg)
"Call `org-export-as-html` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-html'."
(interactive "P")
- (org-export-as-html arg nil nil "*Org HTML Export*")
+ (org-export-as-html arg nil "*Org HTML Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org HTML Export*")))
@@ -865,9 +865,7 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; to activate the region
(goto-char beg)
- (setq rtn (org-export-as-html
- nil nil ext-plist
- buffer body-only))
+ (setq rtn (org-export-as-html nil ext-plist buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
@@ -1171,14 +1169,12 @@ OPT-PLIST is the export options list."
(defvar org-heading-keyword-regexp-format) ; defined in org.el
;;;###autoload
-(defun org-export-as-html (arg &optional hidden ext-plist
- to-buffer body-only pub-dir)
+(defun org-export-as-html (arg &optional ext-plist to-buffer body-only pub-dir)
"Export the outline as a pretty HTML 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 become bulleted
-lists. HIDDEN is obsolete and does nothing.
-EXT-PLIST is a property list with external parameters overriding
+lists. 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
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index d105142..c68c119 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -577,7 +577,7 @@ PUB-DIR is the publishing directory."
(setq export-buf-or-file
(funcall (intern (concat "org-export-as-" format))
(plist-get plist :headline-levels)
- nil plist nil
+ plist nil
(plist-get plist :body-only)
pub-dir))
(when (and (bufferp export-buf-or-file)