Fix wrong number of arguments error
This commit is contained in:
parent
44a97db410
commit
9f59f938f4
|
@ -2231,7 +2231,7 @@ refresh the `chronometrist' buffer."
|
|||
(let ((task (chronometrist-current-task)))
|
||||
(and task
|
||||
(yes-or-no-p (format "Stop tracking time for %s? " task))
|
||||
(chronometrist-out))
|
||||
(chronometrist-run-functions-and-clock-out task))
|
||||
t))
|
||||
;; query-stop:1 ends here
|
||||
|
||||
|
@ -2246,9 +2246,9 @@ TASK is the name of the task, a string. PREFIX is ignored."
|
|||
;; chronometrist-in:1 ends here
|
||||
|
||||
;; [[file:chronometrist.org::*chronometrist-out][chronometrist-out:1]]
|
||||
(cl-defun chronometrist-out (&key (save t))
|
||||
"Record current moment as stop time to last s-exp in `chronometrist-file'.
|
||||
PREFIX is ignored."
|
||||
(cl-defun chronometrist-out (_task &key (save t))
|
||||
"Record current moment as stop time for the latest record.
|
||||
TASK is ignored."
|
||||
(interactive "P")
|
||||
(let* ((latest (chronometrist-latest-record (chronometrist-active-backend)))
|
||||
(plist (plist-put latest :stop (chronometrist-format-time-iso8601))))
|
||||
|
@ -2268,7 +2268,7 @@ PREFIX is ignored."
|
|||
(defun chronometrist-run-functions-and-clock-out (task)
|
||||
"Run hooks and clock out of TASK."
|
||||
(when (run-hook-with-args-until-failure 'chronometrist-before-out-functions task)
|
||||
(chronometrist-out :save nil)
|
||||
(chronometrist-out task :save nil)
|
||||
(run-hook-with-args 'chronometrist-after-out-functions task)
|
||||
(chronometrist-save-backend (chronometrist-active-backend))))
|
||||
;; run-functions-and-clock-out:1 ends here
|
||||
|
|
|
@ -3196,7 +3196,7 @@ refresh the `chronometrist' buffer."
|
|||
(let ((task (chronometrist-current-task)))
|
||||
(and task
|
||||
(yes-or-no-p (format "Stop tracking time for %s? " task))
|
||||
(chronometrist-out))
|
||||
(chronometrist-run-functions-and-clock-out task))
|
||||
t))
|
||||
#+END_SRC
|
||||
|
||||
|
@ -3213,9 +3213,9 @@ TASK is the name of the task, a string. PREFIX is ignored."
|
|||
|
||||
**** chronometrist-out :command:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(cl-defun chronometrist-out (&key (save t))
|
||||
"Record current moment as stop time to last s-exp in `chronometrist-file'.
|
||||
PREFIX is ignored."
|
||||
(cl-defun chronometrist-out (_task &key (save t))
|
||||
"Record current moment as stop time for the latest record.
|
||||
TASK is ignored."
|
||||
(interactive "P")
|
||||
(let* ((latest (chronometrist-latest-record (chronometrist-active-backend)))
|
||||
(plist (plist-put latest :stop (chronometrist-format-time-iso8601))))
|
||||
|
@ -3237,7 +3237,7 @@ PREFIX is ignored."
|
|||
(defun chronometrist-run-functions-and-clock-out (task)
|
||||
"Run hooks and clock out of TASK."
|
||||
(when (run-hook-with-args-until-failure 'chronometrist-before-out-functions task)
|
||||
(chronometrist-out :save nil)
|
||||
(chronometrist-out task :save nil)
|
||||
(run-hook-with-args 'chronometrist-after-out-functions task)
|
||||
(chronometrist-save-backend (chronometrist-active-backend))))
|
||||
#+END_SRC
|
||||
|
|
Reference in New Issue