瀏覽代碼

Save location of stored remember notes when saving with org-refile

This sets the bookmark org-remember-last-stored to the location
of the stored remember note when it is filed using C-1 C-c C-c
(the org-refile interface)

Both org-refile-last-stored and org-remember-last-stored bookmarks
will point at the same place after saving the remember buffer.

This makes jumping to the last stored remember note more consistent
Bernt Hansen 16 年之前
父節點
當前提交
e950543211
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lisp/org-remember.el

+ 4 - 0
lisp/org-remember.el

@@ -769,6 +769,10 @@ See also the variable `org-reverse-note-order'."
 		 (not fastp))
 	(org-refile nil (or visiting (find-file-noselect file)))
 	(and visitp (run-with-idle-timer 0.01 nil 'org-remember-visit-immediately))
+	(save-excursion
+	  (bookmark-jump "org-refile-last-stored")
+	  (bookmark-set "org-remember-last-stored")
+	  (move-marker org-remember-last-stored-marker (point)))
 	(throw 'quit t))
       ;; Find the file
       (if (not visiting) (find-file-noselect file))