Compare commits
3 Commits
482cebea68
...
d1e3409e80
| Author | SHA1 | Date | |
|---|---|---|---|
| d1e3409e80 | |||
| 498f4b78c4 | |||
| 7128144ee0 |
@ -424,19 +424,26 @@ should not be clocked."
|
||||
|
||||
This functions tries to clock into the interrupted task, the
|
||||
parent task, or the default task, in that order and only when
|
||||
available, respectively. If none of these tasks is available,
|
||||
interactively query the user for the next task to clock into."
|
||||
available, respectively. Clock in to the interrupted task only
|
||||
if it is not closed yet.
|
||||
|
||||
If none of the listed tasks is available, interactively query the
|
||||
user for the next task to clock into."
|
||||
(when (and (not org-clock-clocking-in)
|
||||
(not org-clock-resolving-clocks-due-to-idleness))
|
||||
(let ((parent-task (db/find-parent-task)))
|
||||
(let (parent-task)
|
||||
(save-mark-and-excursion
|
||||
(cond
|
||||
((and (markerp org-clock-interrupted-task)
|
||||
(marker-buffer org-clock-interrupted-task))
|
||||
;; interrupted task is set
|
||||
(marker-buffer org-clock-interrupted-task)
|
||||
(org-with-point-at org-clock-interrupted-task
|
||||
(not (member (nth 2 (org-heading-components))
|
||||
org-done-keywords))))
|
||||
;; interrupted task is set and not closed yet, so let's clock in
|
||||
;; there
|
||||
(org-with-point-at org-clock-interrupted-task
|
||||
(org-clock-in)))
|
||||
(parent-task
|
||||
((setq parent-task (db/find-parent-task))
|
||||
;; found parent task
|
||||
(org-with-point-at parent-task
|
||||
(org-clock-in)))
|
||||
@ -466,7 +473,7 @@ interactively query the user for the next task to clock into."
|
||||
(modify-frame-parameters frame `((name . ,org-clock-heading)))))))
|
||||
|
||||
(defun db/show-current-org-task ()
|
||||
"Show title of currently clock in task in modeline."
|
||||
"Show title of currently clock in task in minibuffer."
|
||||
(interactive)
|
||||
(message org-clock-current-task))
|
||||
|
||||
@ -816,10 +823,11 @@ PARAMS is a property list of the following parameters:
|
||||
|
||||
(defun db/org-clock-in-last-task (&optional arg)
|
||||
;; from doc.norang.ca, originally bh/clock-in-last-task
|
||||
"Clock in the interrupted task if there is one.
|
||||
"Clock into the last task from the clocking history.
|
||||
|
||||
Skip the default task and get the next one. If ARG is given,
|
||||
forces clocking in of the default task."
|
||||
Skip the default task if it's at the top of the clocking history,
|
||||
and get the next one. If ARG is given, forces clocking in of the
|
||||
default task, though."
|
||||
(interactive "p")
|
||||
(let ((clock-in-to-task
|
||||
(cond
|
||||
|
||||
Loading…
Reference in New Issue
Block a user