Am 15.12.2012 09:41, schrieb Bastien:
> Hi Rainer,
>
> Rainer Stengele <[email protected]> writes:
>
>> When I am bookmark-jumping to one of these subtrees and then clock in
>> the clock drawer is always closed - which normally is fine. But in this
>> case I would like to maybe have a property signaling the drawer to open
>> as soon as I do clock the task in.
>
> I'd use `org-clock-in-prepare-hook' like this:
>
> (add-hook 'org-clock-in-prepare-hook 'show-subtree)
>
> HTH,
>
Hi Bastien,
works perfectly:
(defun rst/show-subtree-for-todos ()
"Show complete subtree, especially the clockings for todos with certain tags"
(save-excursion
(when (member "ONGOING" (org-get-tags-at))
(show-subtree))))
(add-hook 'org-clock-in-prepare-hook 'show-subtree)
Thanks a lot!
Rainer