瀏覽代碼

Merge branch 'maint'

Conflicts:
	testing/lisp/test-ob-exp.el
Bastien Guerry 12 年之前
父節點
當前提交
24dea073bc
共有 6 個文件被更改,包括 24 次插入32 次删除
  1. 4 8
      lisp/org-ascii.el
  2. 6 10
      lisp/org-html.el
  3. 1 1
      lisp/org-publish.el
  4. 11 11
      testing/lisp/test-ob-exp.el
  5. 1 1
      testing/lisp/test-ob-lob.el
  6. 1 1
      testing/lisp/test-org-exp.el

+ 4 - 8
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.
   "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'."
 No file is created.  The prefix ARG is passed through to `org-export-as-ascii'."
   (interactive "P")
   (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
   (when org-export-show-temporary-export-buffer
     (switch-to-buffer-other-window "*Org ASCII Export*")))
     (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)
     (goto-char end)
     (set-mark (point)) ;; to activate the region
     (set-mark (point)) ;; to activate the region
     (goto-char beg)
     (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 (fboundp 'deactivate-mark) (deactivate-mark))
     (if (and (org-called-interactively-p 'any) (bufferp rtn))
     (if (and (org-called-interactively-p 'any) (bufferp rtn))
 	(switch-to-buffer-other-window rtn)
 	(switch-to-buffer-other-window rtn)
       rtn)))
       rtn)))
 
 
 ;;;###autoload
 ;;;###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.
   "Export the outline as a pretty ASCII file.
 If there is an active region, export only the region.
 If there is an active region, export only the region.
 The prefix ARG specifies how many levels of the outline should become
 The prefix ARG specifies how many levels of the outline should become
 underlined headlines, default is 3.    Lower levels will become bulleted
 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
 org-mode's default settings, but still inferior to file-local
 settings.  When TO-BUFFER is non-nil, create a buffer with that
 settings.  When TO-BUFFER is non-nil, create a buffer with that
 name and export to that buffer.  If TO-BUFFER is the symbol
 name and export to that buffer.  If TO-BUFFER is the symbol

+ 6 - 10
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
 The prefix ARG specifies how many levels of the outline should become
 headlines.  The default is 3.  Lower levels will become bulleted lists."
 headlines.  The default is 3.  Lower levels will become bulleted lists."
   (interactive "P")
   (interactive "P")
-  (org-export-as-html arg 'hidden)
+  (org-export-as-html arg)
   (org-open-file buffer-file-name)
   (org-open-file buffer-file-name)
   (when org-export-kill-product-buffer-when-displayed
   (when org-export-kill-product-buffer-when-displayed
     (kill-buffer (current-buffer))))
     (kill-buffer (current-buffer))))
@@ -806,14 +806,14 @@ emacs   --batch
         --load=$HOME/lib/emacs/org.el
         --load=$HOME/lib/emacs/org.el
         --eval \"(setq org-export-headline-levels 2)\"
         --eval \"(setq org-export-headline-levels 2)\"
         --visit=MyFile --funcall org-export-as-html-batch"
         --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
 ;;;###autoload
 (defun org-export-as-html-to-buffer (arg)
 (defun org-export-as-html-to-buffer (arg)
   "Call `org-export-as-html` with output to a temporary buffer.
   "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'."
 No file is created.  The prefix ARG is passed through to `org-export-as-html'."
   (interactive "P")
   (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
   (when org-export-show-temporary-export-buffer
     (switch-to-buffer-other-window "*Org HTML Export*")))
     (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)
     (goto-char end)
     (set-mark (point)) ;; to activate the region
     (set-mark (point)) ;; to activate the region
     (goto-char beg)
     (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 (fboundp 'deactivate-mark) (deactivate-mark))
     (if (and (org-called-interactively-p 'any) (bufferp rtn))
     (if (and (org-called-interactively-p 'any) (bufferp rtn))
 	(switch-to-buffer-other-window 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
 (defvar org-heading-keyword-regexp-format) ; defined in org.el
 
 
 ;;;###autoload
 ;;;###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.
   "Export the outline as a pretty HTML file.
 If there is an active region, export only the region.  The prefix
 If there is an active region, export only the region.  The prefix
 ARG specifies how many levels of the outline should become
 ARG specifies how many levels of the outline should become
 headlines.  The default is 3.  Lower levels will become bulleted
 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
 org-mode's default settings, but still inferior to file-local
 settings.  When TO-BUFFER is non-nil, create a buffer with that
 settings.  When TO-BUFFER is non-nil, create a buffer with that
 name and export to that buffer.  If TO-BUFFER is the symbol
 name and export to that buffer.  If TO-BUFFER is the symbol

+ 1 - 1
lisp/org-publish.el

@@ -577,7 +577,7 @@ PUB-DIR is the publishing directory."
 	(setq export-buf-or-file
 	(setq export-buf-or-file
 	      (funcall (intern (concat "org-export-as-" format))
 	      (funcall (intern (concat "org-export-as-" format))
 		       (plist-get plist :headline-levels)
 		       (plist-get plist :headline-levels)
-		       nil plist nil
+		       plist nil
 		       (plist-get plist :body-only)
 		       (plist-get plist :body-only)
 		       pub-dir))
 		       pub-dir))
 	(when (and (bufferp export-buf-or-file)
 	(when (and (bufferp export-buf-or-file)

+ 11 - 11
testing/lisp/test-ob-exp.el

@@ -75,7 +75,7 @@
   (org-test-at-id "eb1f6498-5bd9-45e0-9c56-50717053e7b7"
   (org-test-at-id "eb1f6498-5bd9-45e0-9c56-50717053e7b7"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (let ((exported-html
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string 'body-only))
+	   (org-export-as-html nil nil 'string 'body-only))
 	  (test-point 0))
 	  (test-point 0))
 
 
       (org-test-with-temp-text-in-file
       (org-test-with-temp-text-in-file
@@ -109,7 +109,7 @@
   (org-test-at-id "8701beb4-13d9-468c-997a-8e63e8b66f8d"
   (org-test-at-id "8701beb4-13d9-468c-997a-8e63e8b66f8d"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (let ((exported-html
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string 'body-only))
+	   (org-export-as-html nil nil 'string 'body-only))
 	  (test-point 0))
 	  (test-point 0))
 
 
       (org-test-with-temp-text-in-file
       (org-test-with-temp-text-in-file
@@ -139,7 +139,7 @@ elements in the final html."
   (org-test-at-id "92518f2a-a46a-4205-a3ab-bcce1008a4bb"
   (org-test-at-id "92518f2a-a46a-4205-a3ab-bcce1008a4bb"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (let ((exported-html
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string 'body-only))
+	   (org-export-as-html nil nil 'string 'body-only))
 	  (test-point 0))
 	  (test-point 0))
       (org-test-with-temp-text-in-file
       (org-test-with-temp-text-in-file
 	  exported-html
 	  exported-html
@@ -172,7 +172,7 @@ elements in the final html."
   (org-test-at-id "5daa4d03-e3ea-46b7-b093-62c1b7632df3"
   (org-test-at-id "5daa4d03-e3ea-46b7-b093-62c1b7632df3"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (let ((exported-html
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string 'body-only))
+	   (org-export-as-html nil nil 'string  'body-only))
 	  (test-point 0))
 	  (test-point 0))
       (org-test-with-temp-text-in-file
       (org-test-with-temp-text-in-file
 	  exported-html
 	  exported-html
@@ -198,7 +198,7 @@ elements in the final html."
 	 "=%name=\n#+BEGIN_SRC %lang%flags\nbody\n#+END_SRC"))
 	 "=%name=\n#+BEGIN_SRC %lang%flags\nbody\n#+END_SRC"))
     (org-test-at-id "b02ddd8a-eeb8-42ab-8664-8a759e6f43d9"
     (org-test-at-id "b02ddd8a-eeb8-42ab-8664-8a759e6f43d9"
       (org-narrow-to-subtree)
       (org-narrow-to-subtree)
-      (let ((ascii (org-export-as-ascii nil nil nil 'string 'body-only)))
+      (let ((ascii (org-export-as-ascii nil nil 'string 'body-only)))
 	(should (string-match "qux" ascii))))))
 	(should (string-match "qux" ascii))))))
 
 
 (ert-deftest ob-exp/export-with-header-argument ()
 (ert-deftest ob-exp/export-with-header-argument ()
@@ -211,14 +211,14 @@ elements in the final html."
 #+BEGIN_SRC %lang%flags\nbody\n#+END_SRC"))
 #+BEGIN_SRC %lang%flags\nbody\n#+END_SRC"))
     (org-test-at-id "b02ddd8a-eeb8-42ab-8664-8a759e6f43d9"
     (org-test-at-id "b02ddd8a-eeb8-42ab-8664-8a759e6f43d9"
       (org-narrow-to-subtree)
       (org-narrow-to-subtree)
-      (let ((ascii (org-export-as-ascii nil nil nil 'string 'body-only)))
+      (let ((ascii (org-export-as-ascii nil nil 'string 'body-only)))
 	(should (string-match "baz" ascii))
 	(should (string-match "baz" ascii))
 	(should (string-match "replace" ascii))))))
 	(should (string-match "replace" ascii))))))
 
 
 (ert-deftest ob-exp/noweb-no-export-and-exports-both ()
 (ert-deftest ob-exp/noweb-no-export-and-exports-both ()
   (org-test-at-id "8a820f6c-7980-43db-8a24-0710d33729c9"
   (org-test-at-id "8a820f6c-7980-43db-8a24-0710d33729c9"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
-    (let ((html (org-export-as-html nil nil nil 'string 'body-only)))
+    (let ((html (org-export-as-html nil nil 'string 'body-only)))
       (should (string-match (regexp-quote "noweb-no-export-and-exports-both-1")
       (should (string-match (regexp-quote "noweb-no-export-and-exports-both-1")
 			    html)))))
 			    html)))))
 
 
@@ -226,7 +226,7 @@ elements in the final html."
   (org-test-at-id "96cc7073-97ec-4556-87cf-1f9bffafd317"
   (org-test-at-id "96cc7073-97ec-4556-87cf-1f9bffafd317"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (let (*evaluation-collector*)
     (let (*evaluation-collector*)
-      (org-export-as-ascii nil nil nil 'string)
+      (org-export-as-ascii nil nil 'string)
       (should (equal '(5 4 3 2 1) *evaluation-collector*)))))
       (should (equal '(5 4 3 2 1) *evaluation-collector*)))))
 
 
 (ert-deftest ob-exp/exports-inline ()
 (ert-deftest ob-exp/exports-inline ()
@@ -242,7 +242,7 @@ elements in the final html."
   (org-test-at-id "bec63a04-491e-4caa-97f5-108f3020365c"
   (org-test-at-id "bec63a04-491e-4caa-97f5-108f3020365c"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (let* ((org-babel-exp-call-line-template "\n: call: %line special-token")
     (let* ((org-babel-exp-call-line-template "\n: call: %line special-token")
-	   (html (org-export-as-html nil nil nil 'string t)))
+	   (html (org-export-as-html nil nil 'string t)))
       (should (string-match "double" html))
       (should (string-match "double" html))
       (should (string-match "16" html))
       (should (string-match "16" html))
       (should (string-match "special-token" html)))))
       (should (string-match "special-token" html)))))
@@ -252,7 +252,7 @@ elements in the final html."
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (org-babel-next-src-block 2)
     (org-babel-next-src-block 2)
     (should (= 110 (org-babel-execute-src-block)))
     (should (= 110 (org-babel-execute-src-block)))
-    (let ((ascii (org-export-as-ascii nil nil nil 'string t)))
+    (let ((ascii (org-export-as-ascii nil nil 'string t)))
       (should-not (string-match (regexp-quote "<<strip-export-1>>") ascii))
       (should-not (string-match (regexp-quote "<<strip-export-1>>") ascii))
       (should-not (string-match (regexp-quote "i=\"10\"") ascii)))))
       (should-not (string-match (regexp-quote "i=\"10\"") ascii)))))
 
 
@@ -277,7 +277,7 @@ elements in the final html."
 #+END_SRC
 #+END_SRC
 "
 "
     (let* ((org-current-export-file (current-buffer))
     (let* ((org-current-export-file (current-buffer))
-	   (ascii (org-export-as-ascii nil nil nil 'string)))
+	   (ascii (org-export-as-ascii nil nil 'string)))
       (should (string-match (regexp-quote (format nil "%S" '(:foo :bar)))
       (should (string-match (regexp-quote (format nil "%S" '(:foo :bar)))
 			    ascii)))))
 			    ascii)))))
 
 

+ 1 - 1
testing/lisp/test-ob-lob.el

@@ -80,7 +80,7 @@
   "Test the export of a variety of library babel call lines."
   "Test the export of a variety of library babel call lines."
   (org-test-at-id "72ddeed3-2d17-4c7f-8192-a575d535d3fc"
   (org-test-at-id "72ddeed3-2d17-4c7f-8192-a575d535d3fc"
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
-    (let ((html (org-export-as-html nil nil nil 'string 'body-only)))
+    (let ((html (org-export-as-html nil nil 'string 'body-only)))
       ;; check the location of each exported number
       ;; check the location of each exported number
       (with-temp-buffer
       (with-temp-buffer
 	(insert html) (goto-char (point-min))
 	(insert html) (goto-char (point-min))

+ 1 - 1
testing/lisp/test-org-exp.el

@@ -26,6 +26,6 @@
     (org-narrow-to-subtree)
     (org-narrow-to-subtree)
     (should (string-match
     (should (string-match
              ", 2"
              ", 2"
-             (org-export-as-ascii nil nil nil 'string)))))
+             (org-export-as-ascii nil nil 'string)))))
 
 
 (provide 'test-org-exp)
 (provide 'test-org-exp)