From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: prevent drawer from folding for specific subtree Date: Sat, 15 Dec 2012 19:05:50 +0100 Message-ID: <50CCBBFE.3060302@online.de> References: <87r4mrg118.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjw6q-0005Jx-J8 for emacs-orgmode@gnu.org; Sat, 15 Dec 2012 13:05:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tjw6p-0003fK-F4 for emacs-orgmode@gnu.org; Sat, 15 Dec 2012 13:05:12 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:59914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjw6p-0003em-5u for emacs-orgmode@gnu.org; Sat, 15 Dec 2012 13:05:11 -0500 In-Reply-To: <87r4mrg118.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org Am 15.12.2012 09:41, schrieb Bastien: > Hi Rainer, > > Rainer Stengele 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