From: John Kitchin Date: Fri, 20 Feb 2015 01:43:40 +0000 (-0500) Subject: modify find key in file X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=1f688e976ac0c5e3b193e3f1d5c5f1885d64066a modify find key in file this seems to fix a long-standing issue when you add new references that do not get recognized. --- 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."