Browse Source

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.
Carsten Dominik 12 years ago
parent
commit
8f3a109a21
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/ox.el

+ 3 - 2
lisp/ox.el

@@ -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)))