(defun arxiv-add-bibtex-entry (arxiv-number bibfile)
"Add bibtex entry for ARXIV-NUMBER to BIBFILE."
(interactive
- (list (read-input "arxiv: ")
+ (list (read-string "arxiv: ")
;; now get the bibfile to add it to
(ido-completing-read
"Bibfile: "
(url-copy-file pdf-url pdf)
;; now check if we got a pdf
(with-temp-buffer
- (insert-file-contents pdf-file)
+ (insert-file-contents pdf)
;; PDFS start with %PDF-1.x as the first few characters.
(if (not (string= (buffer-substring 1 6) "%PDF-"))
(progn
(message "%s" (buffer-string))
- (delete-file pdf-file))
- (message "%s saved" pdf-file)))
+ (delete-file pdf))
+ (message "%s saved" pdf)))
(org-open-file pdf)))