فهرست منبع

org-export: Fix collision between old export menu and new one

* contrib/lisp/org-export.el (org-export-dispatch-ui): Do not use same
  buffer name as previous export dispatcher.  Also make sure the
  temporary buffer is deleted once the export is done.
Nicolas Goaziou 12 سال پیش
والد
کامیت
f0bcf780a3
1فایلهای تغییر یافته به همراه12 افزوده شده و 7 حذف شده
  1. 12 7
      contrib/lisp/org-export.el

+ 12 - 7
contrib/lisp/org-export.el

@@ -4530,13 +4530,18 @@ back to standard interface."
 	 expert-prompt allowed-keys backends options first-key expertp)
       (save-window-excursion
 	(delete-other-windows)
-	(with-current-buffer (get-buffer-create "*Org Export/Publishing Help*")
-	  (erase-buffer)
-	  (save-excursion (insert help)))
-	(org-fit-window-to-buffer
-	 (display-buffer "*Org Export/Publishing Help*"))
-	(org-export-dispatch-action
-	 standard-prompt allowed-keys backends options first-key expertp)))))
+	(unwind-protect
+	    (progn
+	      (with-current-buffer
+		  (get-buffer-create "*Org Export Dispatcher*")
+		(erase-buffer)
+		(save-excursion (insert help)))
+	      (org-fit-window-to-buffer
+	       (display-buffer "*Org Export Dispatcher*"))
+	      (org-export-dispatch-action
+	       standard-prompt allowed-keys backends options first-key expertp))
+	  (and (get-buffer "*Org Export Dispatcher*")
+	       (kill-buffer "*Org Export Dispatcher*")))))))
 
 (defun org-export-dispatch-action
   (prompt allowed-keys backends options first-key expertp)