elisp 是否具有获取 url 和目的地并从 Internet 下载该 url 的功能?
我发现了 url-retrieve
和 url-retrieve-synchronously
但是 url-retrieve
接受回调和 url-retrieve-synchronously
将所有内容放入缓冲区。有没有更简单的?
最佳答案
试试 url-copy-file
.它的描述是,
url-copy-file is an autoloaded Lisp function in `url-handlers.el'.
(url-copy-file url newname &optional ok-if-already-exists keep-time)
Copy url to newname. Both args must be strings. Signals a `file-already-exists' error if file newname already exists, unless a third argument ok-if-already-exists is supplied and non-nil. A number as third arg means request confirmation if newname already exists. This is what happens in interactive use with M-x. Fourth arg keep-time non-nil means give the new file the same last-modified time as the old one. (This works on only some systems.) A prefix arg makes keep-time non-nil.
关于emacs - 使用 Emacs Lisp 下载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4448055/