Use base buffer for storing export dispatch position

* lisp/ox.el (org-export-dispatch): Make sure the last position marker
  uses the base buffer if there is one.
This commit is contained in:
Carsten Dominik 2013-02-28 12:53:45 +01:00
parent 8e0b4529f7
commit 8f3a109a21
1 changed files with 3 additions and 2 deletions

View File

@ -5317,7 +5317,8 @@ When ARG is \\[universal-argument] \\[universal-argument], display the asynchron
(progn
;; Remember where we are
(move-marker org-export-dispatch-last-position
(point))
(point)
(org-base-buffer (current-buffer)))
;; Get and store an export command
(setq org-export-dispatch-last-action
(org-export--dispatch-ui
@ -5352,7 +5353,7 @@ When ARG is \\[universal-argument] \\[universal-argument], display the asynchron
;; Repeating command, maybe move cursor
;; to restore subtree context
(if (eq (marker-buffer org-export-dispatch-last-position)
(current-buffer))
(org-base-buffer (current-buffer)))
(goto-char org-export-dispatch-last-position)
;; We are in a differnet buffer, forget position
(move-marker org-export-dispatch-last-position nil)))