I store lots of state-change messages and timing info in the
Most of the time, I don't look into the
LOGBOOK drawer, but once in a while when following up on a pending task, I peek into the
LOGBOOK drawer to see my note.
I'm looking for a quick-way to expand the drawer using TAB on the head-line.
Currently, 1st tab expands the entry, 2nd tab expands entry + subentry but not the
Ideally, I'd like to:
- First tab expands the entry,
- Second tab expands sub-headings including
LOGBOOKdrawer (but not
PROPERTIESor other drawers).
So I'm trying to tie in a function into the
org-cycle-hook, but I have an issue:
(defun my/expand-logbook-drawer () "Expand the closest logbook drawer" (interactive) (search-forward ":LOGBOOK:") (org-cycle) ) (add-hook 'org-cycle-hook (lambda (my/var/curr-state) (interactive) (message "State changed") (when (= my/var/curr-state "all") ;This comparison doesn't work, error: wrong argument, number-or-marker-p (my/expand-logbook-drawer) ) ) )
It seems my comparison function doesn't work. Thoughts?
Note, the org-mode-cycle docu is here