]> git.donarmstrong.com Git - org-ref.git/blobdiff - doi-utils.org
add date and author
[org-ref.git] / doi-utils.org
index fe64cffabab4c8f8ddd59190752d14e1c6f4f0c6..5e539dbff3147bee8be0b3535df4e62a83255b68 100644 (file)
@@ -552,11 +552,14 @@ It may be you are in some other place when you want to add a bibtex entry. This
 
 #+BEGIN_SRC emacs-lisp :tangle doi-utils.el
 (defun doi-utils-add-bibtex-entry-from-doi (doi bibfile)
-  "add entry to end a file in `org-ref-default-bibliography'."
+  "add entry to end of a file in `org-ref-default-bibliography' or in the current directory ending with .bib."
   (interactive
    (list
     (read-string "DOI: ")
-    (ido-completing-read "Bibfile: " org-ref-default-bibliography)))
+    (ido-completing-read
+     "Bibfile: "
+     (append org-ref-default-bibliography
+            (f-entries "." (lambda (f) (f-ext? f "bib")))))))
   (find-file bibfile)
   (goto-char (point-min))
   (if (search-forward doi nil t)