(goto-char (point-min))
;; put new entry in notes if we don't find it.
- (unless (re-search-forward (format ":Custom_ID: %s$" key) nil 'end)
+ (if (re-search-forward (format ":Custom_ID: %s$" key) nil 'end)
+ (progn
+ (show-subtree)
+ (outline-previous-visible-heading 1))
+ ;; no entry found, so add one
(insert (format "\n** TODO %s - %s" year title))
(insert (format"
:PROPERTIES: