Function: org-capture-store-last-position
org-capture-store-last-position is a byte-compiled function defined in
org-capture.el.gz.
Signature
(org-capture-store-last-position)
Documentation
Store the last-captured position.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-capture.el.gz
(defun org-capture-store-last-position ()
"Store the last-captured position."
(let* ((where (org-capture-get :position-for-last-stored 'local))
(pos (cond
((markerp where)
(prog1 (marker-position where)
(move-marker where nil)))
((and (listp where) (eq (car where) 'table-line))
(if (org-at-table-p)
(save-excursion
(org-table-goto-line (nth 1 where))
(line-beginning-position))
(point))))))
(with-current-buffer (buffer-base-buffer (current-buffer))
(org-with-point-at pos
(when org-capture-bookmark
(let ((bookmark (plist-get org-bookmark-names-plist :last-capture)))
(when bookmark (with-demoted-errors "Bookmark set error: %S"
(bookmark-set bookmark)))))
(move-marker org-capture-last-stored-marker (point))))))