forked from mirrors/org-mode
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:
parent
8e0b4529f7
commit
8f3a109a21
|
@ -5317,7 +5317,8 @@ When ARG is \\[universal-argument] \\[universal-argument], display the asynchron
|
||||||
(progn
|
(progn
|
||||||
;; Remember where we are
|
;; Remember where we are
|
||||||
(move-marker org-export-dispatch-last-position
|
(move-marker org-export-dispatch-last-position
|
||||||
(point))
|
(point)
|
||||||
|
(org-base-buffer (current-buffer)))
|
||||||
;; Get and store an export command
|
;; Get and store an export command
|
||||||
(setq org-export-dispatch-last-action
|
(setq org-export-dispatch-last-action
|
||||||
(org-export--dispatch-ui
|
(org-export--dispatch-ui
|
||||||
|
@ -5352,7 +5353,7 @@ When ARG is \\[universal-argument] \\[universal-argument], display the asynchron
|
||||||
;; Repeating command, maybe move cursor
|
;; Repeating command, maybe move cursor
|
||||||
;; to restore subtree context
|
;; to restore subtree context
|
||||||
(if (eq (marker-buffer org-export-dispatch-last-position)
|
(if (eq (marker-buffer org-export-dispatch-last-position)
|
||||||
(current-buffer))
|
(org-base-buffer (current-buffer)))
|
||||||
(goto-char org-export-dispatch-last-position)
|
(goto-char org-export-dispatch-last-position)
|
||||||
;; We are in a differnet buffer, forget position
|
;; We are in a differnet buffer, forget position
|
||||||
(move-marker org-export-dispatch-last-position nil)))
|
(move-marker org-export-dispatch-last-position nil)))
|
||||||
|
|
Loading…
Reference in New Issue