From: Alan Schmitt Date: Thu, 9 Apr 2015 09:21:21 +0000 (+0200) Subject: adding calls to `bibtex-set-dialect` X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=c384cbac7abf81c4e9494d6801c4a398e8cd35b7 adding calls to `bibtex-set-dialect` Adding calls to `bibtex-set-dialect` each time a temporary buffer is created with the contents of a bib file. --- diff --git a/org-ref.el b/org-ref.el index 4a87969..aca0b56 100644 --- a/org-ref.el +++ b/org-ref.el @@ -507,6 +507,7 @@ Format according to the type in `org-ref-bibliography-entry-format'." (with-temp-buffer (insert-file-contents file) + (bibtex-set-dialect nil t) (bibtex-search-entry key nil 0) (setq bibtex-entry (bibtex-parse-entry)) ;; downcase field names so they work in the format-citation code @@ -581,6 +582,7 @@ Format according to the type in `org-ref-bibliography-entry-format'." (with-temp-buffer (insert-file-contents file) + (bibtex-set-dialect nil t) (bibtex-search-entry key nil 0) (setq entry (bibtex-parse-entry)) (format "** %s - %s @@ -1539,6 +1541,7 @@ falling back to what the user has set in `org-ref-default-bibliography'" (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) ;; I like this better than bibtex-url which does not always find ;; the urls @@ -1565,6 +1568,7 @@ falling back to what the user has set in `org-ref-default-bibliography'" (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (org-ref-open-bibtex-notes))))) @@ -1579,6 +1583,7 @@ falling back to what the user has set in `org-ref-default-bibliography'" (message "%s" (progn (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (org-ref-bib-citation)))))) @@ -1651,6 +1656,7 @@ Prompt for NEW-FILE includes bib files in `org-ref-default-bibliography', and bi (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (setq doi (bibtex-autokey-get-field "doi")) ;; in case doi is a url, remove the url part. @@ -1708,11 +1714,13 @@ get a lot of options. LINK-STRING is used by the link function." (url (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (bibtex-autokey-get-field "url")))) (doi (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) ;; I like this better than bibtex-url which does not always find ;; the urls @@ -1789,6 +1797,7 @@ get a lot of options. LINK-STRING is used by the link function." (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (org-ref-bib-citation)))) "\n" @@ -2740,6 +2749,7 @@ Shows bad citations, ref links and labels" (bibfile (cdr results))) (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key nil 0) (prog1 (reftex-get-bib-field "year" (bibtex-parse-entry t)) )))) @@ -3227,6 +3237,7 @@ With two prefix args, insert a label link." (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (org-ref-bib-citation))) "!!! No entry found !!!" ))) @@ -3242,11 +3253,13 @@ Checks for pdf and doi, and add appropriate functions." (url (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) (bibtex-autokey-get-field "url")))) (doi (save-excursion (with-temp-buffer (insert-file-contents bibfile) + (bibtex-set-dialect nil t) (bibtex-search-entry key) ;; I like this better than bibtex-url which does not always find ;; the urls