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.
This commit is contained in:
Nicolas Goaziou 2012-09-14 13:54:43 +02:00
parent 275412a4a2
commit f0bcf780a3
1 changed files with 12 additions and 7 deletions

View File

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