]> git.donarmstrong.com Git - org-ref.git/commitdiff
merged fix from https://github.com/jkitchin/org-ref/pull/32
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Thu, 9 Apr 2015 13:37:32 +0000 (09:37 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Thu, 9 Apr 2015 13:37:32 +0000 (09:37 -0400)
1  2 
org-ref.el

diff --combined org-ref.el
index f866ab975b4667bb7fe5db8e82e762e37eac2b38,8be10ef67a1170df7fbfe103fef37857f24703a9..9f02da885ecc678a09fdd4fd2b0d10c122fe3ca8
@@@ -507,7 -507,7 +507,7 @@@ Format according to the type in `org-re
  
      (with-temp-buffer
        (insert-file-contents file)
-       (bibtex-set-dialect nil t)
+       (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
        (bibtex-search-entry key nil 0)
        (setq bibtex-entry (bibtex-parse-entry))
        ;; downcase field names so they work in the format-citation code
  
      (with-temp-buffer
        (insert-file-contents file)
-       (bibtex-set-dialect nil t)
+       (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
        (bibtex-search-entry key nil 0)
        (setq entry (bibtex-parse-entry))
        (format "** %s - %s
@@@ -1541,7 -1541,7 +1541,7 @@@ falling back to what the user has set i
      (save-excursion
        (with-temp-buffer
          (insert-file-contents bibfile)
-       (bibtex-set-dialect nil t)
+         (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
          (bibtex-search-entry key)
          ;; I like this better than bibtex-url which does not always find
          ;; the urls
      (save-excursion
        (with-temp-buffer
          (insert-file-contents bibfile)
-       (bibtex-set-dialect nil t)
+         (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
          (bibtex-search-entry key)
          (org-ref-open-bibtex-notes)))))
  
      (message "%s" (progn
                    (with-temp-buffer
                        (insert-file-contents bibfile)
-                     (bibtex-set-dialect nil t)
+                       (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
                        (bibtex-search-entry key)
                        (org-ref-bib-citation))))))
  
@@@ -1656,7 -1656,7 +1656,7 @@@ Prompt for NEW-FILE includes bib files 
      (save-excursion
        (with-temp-buffer
          (insert-file-contents bibfile)
-       (bibtex-set-dialect nil t)
+         (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
          (bibtex-search-entry key)
        (setq doi (bibtex-autokey-get-field "doi"))
        ;; in case doi is a url, remove the url part.
@@@ -1714,13 -1714,13 +1714,13 @@@ get a lot of options.  LINK-STRING is u
         (url (save-excursion
                (with-temp-buffer
                  (insert-file-contents bibfile)
-                 (bibtex-set-dialect nil t)
+                   (bibtex-set-dialect (parsebib-find-bibtex-dialect) 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-set-dialect (parsebib-find-bibtex-dialect) t)
                  (bibtex-search-entry key)
                  ;; I like this better than bibtex-url which does not always find
                  ;; the urls
        (save-excursion
          (with-temp-buffer
            (insert-file-contents bibfile)
-           (bibtex-set-dialect nil t)
+             (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
            (bibtex-search-entry key)
            (org-ref-bib-citation))))
        "\n"
@@@ -2102,7 -2102,7 +2102,7 @@@ arg (ALTERNATIVE-CITE) to get a menu o
  (defun org-ref-bib-citation ()
    "From a bibtex entry, create and return a simple citation string.
  This assumes you are in an article."
 -
 +  (bibtex-set-dialect nil t)
    (bibtex-beginning-of-entry)
    (let* ((cb (current-buffer))
         (bibtex-expand-strings t)
@@@ -2749,7 -2749,7 +2749,7 @@@ Shows bad citations, ref links and labe
         (bibfile (cdr results)))
      (with-temp-buffer
        (insert-file-contents bibfile)
-       (bibtex-set-dialect nil t)
+       (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
        (bibtex-search-entry key nil 0)
        (prog1 (reftex-get-bib-field "year" (bibtex-parse-entry t))
          ))))
@@@ -3237,7 -3237,7 +3237,7 @@@ With two prefix args, insert a label li
        (save-excursion
          (with-temp-buffer
            (insert-file-contents bibfile)
-           (bibtex-set-dialect nil t)
+             (bibtex-set-dialect (parsebib-find-bibtex-dialect) t)
            (bibtex-search-entry key)
            (org-ref-bib-citation)))
        "!!! No entry found !!!" )))
@@@ -3253,13 -3253,13 +3253,13 @@@ Checks for pdf and doi, and add appropr
         (url (save-excursion
                (with-temp-buffer
                  (insert-file-contents bibfile)
-                 (bibtex-set-dialect nil t)
+                   (bibtex-set-dialect (parsebib-find-bibtex-dialect) 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-set-dialect (parsebib-find-bibtex-dialect) t)
                  (bibtex-search-entry key)
                  ;; I like this better than bibtex-url which does not always find
                  ;; the urls