Quellcode durchsuchen

org-clock.el (org-clock-jump-to-current-clock): Tiny enhancements

* lisp/org-clock.el (org-clock-jump-to-current-clock): Add a
docstring, do not use as a command and throw a user error
instead of an error when no clock is active.
Bastien vor 7 Jahren
Ursprung
Commit
1933d9ef26
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      lisp/org-clock.el

+ 2 - 2
lisp/org-clock.el

@@ -949,12 +949,12 @@ If necessary, clock-out of the currently active clock."
 					     resolve-to))))))))
 
 (defun org-clock-jump-to-current-clock (&optional effective-clock)
-  (interactive)
+  "When an Org clock is running, jump to it."
   (let ((drawer (org-clock-into-drawer))
 	(clock (or effective-clock (cons org-clock-marker
 					 org-clock-start-time))))
     (unless (marker-buffer (car clock))
-      (error "No clock is currently running"))
+      (user-error "No Org clock is currently running"))
     (org-with-clock clock (org-clock-goto))
     (with-current-buffer (marker-buffer (car clock))
       (goto-char (car clock))