瀏覽代碼

Fix bookmarking the capture position

* lisp/org-capture.el (org-capture-refile): Do not try to manipulate
bookmark list.
* lisp/org.el (org-refile): Use the correct bookmark here.
Carsten Dominik 14 年之前
父節點
當前提交
cb1ab577a2
共有 2 個文件被更改,包括 2 次插入11 次删除
  1. 1 10
      lisp/org-capture.el
  2. 1 1
      lisp/org.el

+ 1 - 10
lisp/org-capture.el

@@ -547,16 +547,7 @@ already gone."
 	  (save-restriction
 	    (widen)
 	    (goto-char pos)
-	    (call-interactively 'org-refile)
-	    (when (and (boundp 'bookmark-alist)
-		       (assoc "org-capture-last-stored" bookmark-alist))
-	      (if (assoc "org-refile-last-stored" bookmark-alist)
-		  (setcdr (assoc "org-refile-last-stored" bookmark-alist)
-			  (cdr (assoc "org-refile-last-stored" bookmark-alist)))
-		(push (cons "org-capture-last-stored"
-			    (cdr (assoc "org-refile-last-stored"
-					bookmark-alist)))
-		      bookmark-alist)))))))))
+	    (call-interactively 'org-refile)))))))
 
 (defun org-capture-kill ()
   "Abort the current capture process."

+ 1 - 1
lisp/org.el

@@ -10143,7 +10143,7 @@ This can be done with a 0 prefix: `C-0 C-c C-w'"
 		  ;; If we are refiling for capture, make sure that the
 		  ;; last-capture pointers point here
 		  (when (org-bound-and-true-p org-refile-for-capture)
-		    (bookmark-set "org-refile-last-stored")
+		    (bookmark-set "org-capture-last-stored-marker")
 		    (move-marker org-capture-last-stored-marker (point)))
 		  (if (fboundp 'deactivate-mark) (deactivate-mark))
 		  (run-hooks 'org-after-refile-insert-hook))))