From: John Kitchin Date: Tue, 23 Sep 2014 16:33:50 +0000 (-0400) Subject: make open the notes show the subtree and go to the beginning of the line X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=c40a50d52e4e81d0bc172a639f0b9437671b9c01;hp=89e5e67f1b6774840cac214f38bf77e43aedf306 make open the notes show the subtree and go to the beginning of the line --- diff --git a/org-ref.org b/org-ref.org index 6810435..5a86177 100644 --- a/org-ref.org +++ b/org-ref.org @@ -1721,7 +1721,11 @@ construct the heading by hand." (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: