Browse Source

New option `org-capture-bookmark' (mentioned in the manual.)

* org.texi (Using capture): Mention the
`org-capture-last-stored' bookmark as a way to jump to the
last stored capture.

* org-capture.el (org-capture-bookmark): New option.
(org-capture-finalize): Use it.
Bastien Guerry 8 years ago
2 changed files with 15 additions and 1 deletions
  1. 6 0
  2. 9 1

+ 6 - 0

@@ -6468,6 +6468,12 @@ template in the usual way.
 Visit the last stored capture item in its buffer.
 @end table
+@vindex org-capture-bookmark
+@cindex org-capture-last-stored
+You can also jump to the bookmark @code{org-capture-last-stored}, which will
+automatically be created unless you set @code{org-capture-bookmark} to
 To insert the capture at point in an Org buffer, call @code{org-capture} with
 a @code{C-0} prefix argument.

+ 9 - 1

@@ -364,6 +364,13 @@ The capture buffer is current and still narrowed."
   :version "24.1"
   :type 'hook)
+(defcustom org-capture-bookmark t
+  "When non-nil, add a bookmark pointing at the last stored
+position when capturing."
+  :group 'org-capture
+  :version "24.2"
+  :type 'boolean)
 ;;; The property list for keeping information about the capture process
 (defvar org-capture-plist nil
@@ -614,7 +621,8 @@ captured item after finalizing."
       ;; Store this place as the last one where we stored something
       ;; Do the marking in the base buffer, so that it makes sense after
       ;; the indirect buffer has been killed.
-      (org-capture-bookmark-last-stored-position)
+      (when org-capture-bookmark
+	(org-capture-bookmark-last-stored-position))
       ;; Run the hook
       (run-hooks 'org-capture-before-finalize-hook))