X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=org-ref.org;h=681043513a175bd3ced6e91133b09a19da05aa3d;hp=acb199d379055a80d8c9816196815b145e9fa369;hb=89e5e67f1b6774840cac214f38bf77e43aedf306;hpb=cc7130950010fe91babbf6b27ee0b2db4774abe9 diff --git a/org-ref.org b/org-ref.org index acb199d..6810435 100644 --- a/org-ref.org +++ b/org-ref.org @@ -568,7 +568,7 @@ We use a link for the bibliography so that we can click on it to open the biblio ((eq format 'html) (org-ref-get-html-bibliography)) ((eq format 'latex) ;; write out the latex bibliography command - (format "\\bibliography{%s}" (replace-regexp-in-string "\\.bib" "" keyword)))))) + (format "\\bibliography{%s}" (replace-regexp-in-string "\\.bib" "" (expand-file-name keyword))))))) #+END_SRC #+BEGIN_SRC emacs-lisp :tangle org-ref.el @@ -579,9 +579,9 @@ We use a link for the bibliography so that we can click on it to open the biblio ((eq format 'org) (org-ref-get-org-bibliography)) ((eq format 'html) (org-ref-get-html-bibliography)) ((eq format 'latex) - ;; write out the latex bibliography command - (format "\\printbibliography" keyword)) -))) + ;; write out the biblatex bibliography command + "\\printbibliography")) +)) #+END_SRC We also create a bibliographystyle link. There is nothing to do on clicking here, and we create it for consistency. This sets the style for latex export, so use something appropriate there, e.g. unsrt, plain, plainnat, ... @@ -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.