emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* prevent drawer from folding for specific subtree
@ 2012-12-14 15:51 Rainer Stengele
  2012-12-15  8:41 ` Bastien
  2012-12-16 18:02 ` Rainer Stengele
  0 siblings, 2 replies; 4+ messages in thread
From: Rainer Stengele @ 2012-12-14 15:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi all!

I have subtrees which I do clock regularly, never closing them.
I always do have to adjust the clockings manually.
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.

Any idea?

Thanks,
Rainer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: prevent drawer from folding for specific subtree
  2012-12-14 15:51 prevent drawer from folding for specific subtree Rainer Stengele
@ 2012-12-15  8:41 ` Bastien
  2012-12-15 18:05   ` Rainer Stengele
  2012-12-16 18:02 ` Rainer Stengele
  1 sibling, 1 reply; 4+ messages in thread
From: Bastien @ 2012-12-15  8:41 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode

Hi Rainer,

Rainer Stengele <rainer.stengele@online.de> 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,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: prevent drawer from folding for specific subtree
  2012-12-15  8:41 ` Bastien
@ 2012-12-15 18:05   ` Rainer Stengele
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer Stengele @ 2012-12-15 18:05 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Am 15.12.2012 09:41, schrieb Bastien:
> Hi Rainer,
> 
> Rainer Stengele <rainer.stengele@online.de> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: prevent drawer from folding for specific subtree
  2012-12-14 15:51 prevent drawer from folding for specific subtree Rainer Stengele
  2012-12-15  8:41 ` Bastien
@ 2012-12-16 18:02 ` Rainer Stengele
  1 sibling, 0 replies; 4+ messages in thread
From: Rainer Stengele @ 2012-12-16 18:02 UTC (permalink / raw)
  Cc: emacs-orgmode

Am 14.12.2012 16:51, schrieb Rainer Stengele:
> Hi all!
> 
> I have subtrees which I do clock regularly, never closing them.
> I always do have to adjust the clockings manually.
> 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.
> 
> Any idea?
> 
> Thanks,
> Rainer
> 
> 
> 
Hi again,

what I really intended to get was this (see doc string)

(defun rst/clock-organisation-todo ()
  "jump to organisation todo, clock in and out,
move starttime to previous full quarter of hour, endtime to following full quarter of hour,
place point on starttime to be able to adjust the clockings"
  (interactive)
  (save-excursion
    (bookmark-jump "Organisation")
    (outline-previous-visible-heading 1)
    (show-subtree)
    (org-clock-in)
    (search-forward "CLOCK: ")
    (end-of-line)
    (backward-char 2)
    (org-shiftcontroldown)
    (org-clock-out)
    (org-shiftcontrolup)
    (org-shiftdown)))

This will save me several keystrokes every day.
Sorry this is beginners emacs lisp.

Rainer

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-16 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-14 15:51 prevent drawer from folding for specific subtree Rainer Stengele
2012-12-15  8:41 ` Bastien
2012-12-15 18:05   ` Rainer Stengele
2012-12-16 18:02 ` Rainer Stengele

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).