Browse Source

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'.
Bastien 5 years ago
parent
commit
915a8eade4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lisp/org-agenda.el
  2. 1 1
      lisp/org-capture.el

+ 1 - 1
lisp/org-agenda.el

@@ -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)

+ 1 - 1
lisp/org-capture.el

@@ -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)