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 acb199d..8f85b1e 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.