From 1f688e976ac0c5e3b193e3f1d5c5f1885d64066a Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Thu, 19 Feb 2015 20:43:40 -0500 Subject: [PATCH] modify find key in file this seems to fix a long-standing issue when you add new references that do not get recognized. --- org-ref.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org-ref.org b/org-ref.org index 79480c1..bf6c7a4 100644 --- a/org-ref.org +++ b/org-ref.org @@ -1716,6 +1716,13 @@ Now, we can see if an entry is in a file. (interactive "skey: \nsFile: ") (save-current-buffer (let ((bibtex-files (list filename))) + ;; This is something I am trying because when the bibtex file is open, and + ;; you have added to it, the only way I find to get the update to update + ;; is to close it and reopen it. or to save it and revert it. + (when (get-file-buffer filename) + (set-buffer (get-file-buffer filename)) + (save-buffer) + (revert-buffer t t)) (bibtex-search-entry key t)))) #+END_SRC @@ -3522,6 +3529,7 @@ This code provides a helm interface to things you can do when you click on a cit (org-ref-bib-citation))) "!!! No entry found !!!" ))) + (defun org-ref-cite-candidates () "Generate the list of possible candidates for click actions on a cite link. Checks for pdf and doi, and add appropriate functions." -- 2.39.2