(bibtex-search-entry key nil 0)
(setq bibtex-entry (bibtex-parse-entry))
;; downcase field names so they work in the format-citation code
(bibtex-search-entry key nil 0)
(setq bibtex-entry (bibtex-parse-entry))
;; downcase field names so they work in the format-citation code
(bibtex-search-entry key)
(setq doi (bibtex-autokey-get-field "doi"))
;; in case doi is a url, remove the url part.
(bibtex-search-entry key)
(setq doi (bibtex-autokey-get-field "doi"))
;; in case doi is a url, remove the url part.
(bibtex-search-entry key)
(bibtex-autokey-get-field "url"))))
(doi (save-excursion
(with-temp-buffer
(insert-file-contents bibfile)
(bibtex-search-entry key)
(bibtex-autokey-get-field "url"))))
(doi (save-excursion
(with-temp-buffer
(insert-file-contents bibfile)
(defun org-ref-bib-citation ()
"From a bibtex entry, create and return a simple citation string.
This assumes you are in an article."
(defun org-ref-bib-citation ()
"From a bibtex entry, create and return a simple citation string.
This assumes you are in an article."
(bibtex-beginning-of-entry)
(let* ((cb (current-buffer))
(bibtex-expand-strings t)
(bibtex-beginning-of-entry)
(let* ((cb (current-buffer))
(bibtex-expand-strings t)
(bibtex-search-entry key)
(bibtex-autokey-get-field "url"))))
(doi (save-excursion
(with-temp-buffer
(insert-file-contents bibfile)
(bibtex-search-entry key)
(bibtex-autokey-get-field "url"))))
(doi (save-excursion
(with-temp-buffer
(insert-file-contents bibfile)