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.
This commit is contained in:
Carsten Dominik 2010-07-13 14:12:45 +02:00
parent d5229333cd
commit cb1ab577a2
2 changed files with 2 additions and 11 deletions

View File

@ -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."

View File

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