Obviamente url-copy-file
es la mejor opción, pero a los piratas informáticos Emacs más aventureros me gustaría sugerir algo como esto:
(require 'url)
(defun download-file (&optional url download-dir download-name)
(interactive)
(let ((url (or url
(read-string "Enter download URL: "))))
(let ((download-buffer (url-retrieve-synchronously url)))
(save-excursion
(set-buffer download-buffer)
;; we may have to trim the http response
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(forward-char)
(delete-region (point-min) (point))
(write-file (concat (or download-dir
"~/downloads/")
(or download-name
(car (last (split-string url "/" t))))))))))
Si solo desea obtener el archivo remoto en un búfer de Emacs, 'browse-url-emacs' es útil. – phils