Skip to content

Instantly share code, notes, and snippets.

@mardukbp
Created September 16, 2013 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mardukbp/6576418 to your computer and use it in GitHub Desktop.
Save mardukbp/6576418 to your computer and use it in GitHub Desktop.
Import citation in bibtex format from journal's website to ebib
(require 'mm-url)
(defun ebib-import-bibtex (url)
(interactive)
(let ((tempbuff (get-buffer-create "*bibtex*")))
(with-current-buffer tempbuff
(mm-url-insert-file-contents url)
(ebib-import)
(kill-buffer (current-buffer))
)
))
@joostkremers
Copy link

BTW, you can write

(with-temp-buffer
  (some code))

instead of

(let ((tempbuff (get-buffer-create "*bibtex*")))
  (with-current-buf tempbuff
    (some code)
    (kill-buffer (current-buffer))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment