Advice this

This commit is contained in:
Benson Chu 2022-09-11 08:33:35 -05:00
parent 0b94d23a2a
commit a4f9dd806c

View file

@ -346,7 +346,7 @@ https://github.com/org-trello/org-trello/issues/258
#+end_src #+end_src
* org clock added new time prompt and new away prompt * org clock added new time prompt and new away prompt
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun org-clock-resolve (clock &optional prompt-fn last-valid fail-quietly) (defun my/org-clock-resolve (clock &optional prompt-fn last-valid fail-quietly)
"Resolve an open Org clock. "Resolve an open Org clock.
An open clock was found, with `dangling' possibly being non-nil. An open clock was found, with `dangling' possibly being non-nil.
If this function was invoked with a prefix argument, non-dangling If this function was invoked with a prefix argument, non-dangling
@ -389,7 +389,7 @@ https://github.com/org-trello/org-trello/issues/258
different from `k': it clocks you out from the beginning of different from `k': it clocks you out from the beginning of
the idle period and clock you back in X minutes ago. the idle period and clock you back in X minutes ago.
a/A Like `g', except don't take the idle timer into account. a/A Like `g', except don't take the idle timer into account.
s/S Subtract the idle time from the current clock. This is the s/S Subtract the idle time from the current clock. This is the
same as keeping 0 minutes. same as keeping 0 minutes.
@ -472,4 +472,8 @@ https://github.com/org-trello/org-trello/issues/258
(and start-over (and start-over
(not (memq ch '(?K ?G ?S ?C)))) (not (memq ch '(?K ?G ?S ?C))))
fail-quietly))))) fail-quietly)))))
(advice-add #'org-clock-resolve
:override
#'my/org-clock-resolve)
#+end_src #+end_src