diff options
Diffstat (limited to 'lisp/org/org-capture.el')
-rw-r--r-- | lisp/org/org-capture.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 945ea52980c..2fd9a9c74da 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1453,7 +1453,8 @@ Of course, if exact position has been required, just put it there." (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 bookmark))))) + (when bookmark (with-demoted-errors "Bookmark set error: %S" + (bookmark-set bookmark))))) (move-marker org-capture-last-stored-marker (point)))))) (defun org-capture-narrow (beg end) @@ -1815,10 +1816,13 @@ by their respective `org-store-link-plist' properties if present." ;; Load history list for current prompt. (setq org-capture--prompt-history (gethash prompt org-capture--prompt-history-table)) - (push (org-completing-read - (concat (or prompt "Enter string") - (and default (format " [%s]" default)) - ": ") + (push (org-completing-read + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt (or prompt "Enter string") default) + (concat (or prompt "Enter string") + (and default (format " [%s]" default)) + ": ")) completions nil nil nil 'org-capture--prompt-history default) strings) |