emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-datetree-goto-date


From: Liam Healy
Subject: [O] org-datetree-goto-date
Date: Sun, 5 May 2013 22:26:15 -0400

I wanted a function that would take me to a particular date in a
datetree and didn't find one, so I wrote my own and bound it to C-c d.

(defun org-datetree-goto-date (&optional siblings)
  "Go to and show the date in the date tree. With optional argument
SIBLINGS, on each level of the hierarchy all
siblings are shown. If no entry exists for the date, it will be created."
  (interactive "P")
  (let ((date (decode-time (org-read-date nil t))))
    (org-datetree-find-date-create (list (nth 4 date) (nth 3 date)
(nth 5 date))))
  (outline-show-heading)
  (show-subtree)
  (org-reveal siblings))

(add-hook 'org-mode-hook
          (lambda ()
            (local-set-key [(control ?c) ?d] 'org-datetree-goto-date)))

Maybe this would be useful for others if included in org-mode.

Liam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]