Inhibit error when saving bookmarks with `debug-on-error' set to non-nil
* lisp/org-capture.el (org-capture-store-last-position):
* lisp/org-refile.el (org-refile): Use `condition-case' instead of
`with-demoted-errors' when saving bookmarks. We intent to suppress
errors completely here (116c09053
), even when `debug-on-error' is set.
`with-demoted-errors' does trigger error in such scenario, unlike
explicit `condition-case' clause.
Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/875y7d7jlr.fsf@gmail.com
This commit is contained in:
parent
5b3a1a634c
commit
94c2c8d929
|
@ -1504,8 +1504,11 @@ Of course, if exact position has been required, just put it there."
|
||||||
(org-with-point-at pos
|
(org-with-point-at pos
|
||||||
(when org-capture-bookmark
|
(when org-capture-bookmark
|
||||||
(let ((bookmark (plist-get org-bookmark-names-plist :last-capture)))
|
(let ((bookmark (plist-get org-bookmark-names-plist :last-capture)))
|
||||||
(when bookmark (with-demoted-errors "Bookmark set error: %S"
|
(when bookmark
|
||||||
(bookmark-set bookmark)))))
|
(condition-case err
|
||||||
|
(bookmark-set bookmark)
|
||||||
|
(error
|
||||||
|
(message (format "Bookmark set error: %S" err)))))))
|
||||||
(move-marker org-capture-last-stored-marker (point))))))
|
(move-marker org-capture-last-stored-marker (point))))))
|
||||||
|
|
||||||
(defun org-capture-narrow (beg end)
|
(defun org-capture-narrow (beg end)
|
||||||
|
|
|
@ -589,16 +589,20 @@ prefix argument (`C-u C-u C-u C-c C-w')."
|
||||||
(let ((bookmark-name (plist-get org-bookmark-names-plist
|
(let ((bookmark-name (plist-get org-bookmark-names-plist
|
||||||
:last-refile)))
|
:last-refile)))
|
||||||
(when bookmark-name
|
(when bookmark-name
|
||||||
(with-demoted-errors "Bookmark set error: %S"
|
(condition-case err
|
||||||
(bookmark-set bookmark-name))))
|
(bookmark-set bookmark)
|
||||||
|
(error
|
||||||
|
(message (format "Bookmark set error: %S" err))))))
|
||||||
;; If we are refiling for capture, make sure that the
|
;; If we are refiling for capture, make sure that the
|
||||||
;; last-capture pointers point here
|
;; last-capture pointers point here
|
||||||
(when (bound-and-true-p org-capture-is-refiling)
|
(when (bound-and-true-p org-capture-is-refiling)
|
||||||
(let ((bookmark-name (plist-get org-bookmark-names-plist
|
(let ((bookmark-name (plist-get org-bookmark-names-plist
|
||||||
:last-capture-marker)))
|
:last-capture-marker)))
|
||||||
(when bookmark-name
|
(when bookmark-name
|
||||||
(with-demoted-errors "Bookmark set error: %S"
|
(condition-case err
|
||||||
(bookmark-set bookmark-name))))
|
(bookmark-set bookmark)
|
||||||
|
(error
|
||||||
|
(message (format "Bookmark set error: %S" err))))))
|
||||||
(move-marker org-capture-last-stored-marker (point)))
|
(move-marker org-capture-last-stored-marker (point)))
|
||||||
(deactivate-mark)
|
(deactivate-mark)
|
||||||
(run-hooks 'org-after-refile-insert-hook)))
|
(run-hooks 'org-after-refile-insert-hook)))
|
||||||
|
|
Loading…
Reference in New Issue