]> git.donarmstrong.com Git - org-ref.git/commitdiff
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 681043513a175bd3ced6e91133b09a19da05aa3d..5a861776feb9307a605f82221392b29606a23ffc 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: