make open the notes show the subtree and go to the beginning of the line
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Tue, 23 Sep 2014 16:33:50 +0000 (12:33 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Tue, 23 Sep 2014 16:33:50 +0000 (12:33 -0400)
org-ref.org

index 6810435..5a86177 100644 (file)
@@ -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: