(goto-char (point-min))
(if (re-search-forward (concat "^\*\* "(format-time-string "%Y-%m")) nil t)
(progn (org-beginning-of-line)
+ (org-fold-show-subtree)
(re-search-forward "^ *:LOGBOOK:")
+ (if (invisible-p (point-at-eol)) (org-cycle))
(next-line)
(org-beginning-of-line)
(insert (format-time-string "CLOCK: [%Y-%m-%d %a %H:%M]"))
(goto-char (point-min))
(if (re-search-forward (concat "^\*\* "(format-time-string "%Y-%m")) nil t)
(progn (org-beginning-of-line)
+ (org-fold-show-subtree)
(re-search-forward "^ *:LOGBOOK:")
+ (if (invisible-p (point-at-eol)) (org-cycle))
(next-line)
(org-end-of-line)
(insert (format-time-string "--[%Y-%m-%d %a %H:%M]"))