X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=doi-utils.org;h=2ec6343363285f0067aced01611b9aed0fea3dd7;hp=fe64cffabab4c8f8ddd59190752d14e1c6f4f0c6;hb=3480996b9e7f3f24715364833732800497480954;hpb=8c8f8e181a24082378e9a22ea2c1af7e8c6bdfa5 diff --git a/doi-utils.org b/doi-utils.org index fe64cff..2ec6343 100644 --- a/doi-utils.org +++ b/doi-utils.org @@ -168,7 +168,7 @@ we just change /abs/ to /pdf/. (replace-regexp-in-string "/abs/" "/pdf/" *doi-utils-redirect*))) #+END_SRC -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (acs-pdf-url "http://pubs.acs.org/doi/abs/10.1021/nl500037x") #+END_SRC @@ -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)