org-agenda.el/org-capture.el: Use `user-error' in two places

* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-agenda.el (org-agenda-clock-out): Use `user-error'.
This commit is contained in:
Bastien 2020-02-17 08:55:19 +01:00
parent e8402f3cad
commit 915a8eade4
2 changed files with 2 additions and 2 deletions

View File

@ -9740,7 +9740,7 @@ ARG is passed through to `org-deadline'."
"Stop the currently running clock."
(interactive)
(unless (marker-buffer org-clock-marker)
(error "No running clock"))
(user-error "No running clock"))
(let ((marker (make-marker)) (col (current-column)) newhead)
(org-with-remote-undo (marker-buffer org-clock-marker)
(with-current-buffer (marker-buffer org-clock-marker)

View File

@ -1061,7 +1061,7 @@ Store them in the capture property list."
(org-capture-put-target-region-and-position)
(widen)
(goto-char org-clock-hd-marker))
(error "No running clock that could be used as capture target")))
(user-error "No running clock that could be used as capture target")))
(target (error "Invalid capture target specification: %S" target)))
(org-capture-put :buffer (current-buffer)