]> git.donarmstrong.com Git - org-ref.git/commitdiff
fix bug. When a file is first opened, clicking on links would not work until the...
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Sat, 13 Sep 2014 16:11:47 +0000 (12:11 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Sat, 13 Sep 2014 16:11:47 +0000 (12:11 -0400)
org-ref.org

index acb199d379055a80d8c9816196815b145e9fa369..8f85b1e4d90ef8a234b3f180f9b3892f0a7efa41 100644 (file)
@@ -1182,11 +1182,9 @@ Now, we can see if an entry is in a file.
 (defun org-ref-key-in-file-p (key filename)
   "determine if the key is in the file"
   (interactive "skey: \nsFile: ")
-
-  (with-temp-buffer
-    (insert-file-contents filename)
-    (prog1
-        (bibtex-search-entry key nil 0))))
+  (save-current-buffer
+    (let ((bibtex-files (list filename)))
+      (bibtex-search-entry key t))))
 #+END_SRC
 
 Finally, we want to know which file the key is in.