Ver Fonte

Publishing: Fix `C-u C-c C-e X'.

Publishing a project with prefix argument to
force publishing was broken.  Actually, the entire interactive side of
this function was implemented badly.  Fixed now.
Carsten Dominik há 16 anos atrás
pai
commit
83e82f9ccd
2 ficheiros alterados com 12 adições e 9 exclusões
  1. 3 0
      lisp/ChangeLog
  2. 9 9
      lisp/org-publish.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-05-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-publish.el (org-publish): Make this function behave
+	correctly in interactive use when called with a prefix argument.
+
 	* org.el (org-todo-statistics-hook): New hook.
 	(org-update-parent-todo-statistics): Use new hook.
 	(org-log-into-drawer): New function.

+ 9 - 9
lisp/org-publish.el

@@ -600,18 +600,18 @@ Default for INDEX-FILENAME is 'sitemap.org'."
 ;;;###autoload
 (defun org-publish (project &optional force)
   "Publish PROJECT."
-  (interactive "P")
+  (interactive
+   (list
+    (assoc (org-ido-completing-read
+	    "Publish project: "
+	    org-publish-project-alist nil t)
+	   org-publish-project-alist)
+    current-prefix-arg))
   (setq org-publish-initial-buffer (current-buffer))
   (save-window-excursion
-    (let* ((force current-prefix-arg)
-	   (org-publish-use-timestamps-flag
+    (let* ((org-publish-use-timestamps-flag
 	    (if force nil org-publish-use-timestamps-flag)))
-      (org-publish-projects
-       (list (or project
-		 (assoc (org-ido-completing-read
-			 "Publish project: "
-			 org-publish-project-alist nil t)
-			org-publish-project-alist)))))))
+      (org-publish-projects (list project)))))
 
 ;;;###autoload
 (defun org-publish-all (&optional force)