[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] prevent drawer from folding for specific subtree
From: |
Rainer Stengele |
Subject: |
Re: [O] prevent drawer from folding for specific subtree |
Date: |
Sat, 15 Dec 2012 19:05:50 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Am 15.12.2012 09:41, schrieb Bastien:
> Hi Rainer,
>
> Rainer Stengele <address@hidden> 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