diff options
author | Bastien Guerry <bzg@altern.org> | 2012-05-25 23:45:31 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-05-25 23:45:31 +0200 |
commit | f71d45a91304bbcfc0cba1f2be657d1d40862d49 (patch) | |
tree | bb6bcbc1834ef35dc2d739bcbf3c0103ed52ca21 | |
parent | 8f2a921cf922b37d21f87fc06af406a25b2101a0 (diff) | |
download | org-mode-f71d45a91304bbcfc0cba1f2be657d1d40862d49.tar.gz |
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.
-rw-r--r-- | doc/org.texi | 6 | ||||
-rw-r--r-- | lisp/org-capture.el | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/doc/org.texi b/doc/org.texi index a5d4bf6..dd45364 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -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 +@code{nil}. + To insert the capture at point in an Org buffer, call @code{org-capture} with a @code{C-0} prefix argument. diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 25b12dc..0e6ab2c 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -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)) |