gpt4 book ai didi

emacs - 使用 Emacs Lisp 下载文件

转载 作者:行者123 更新时间:2023-12-03 11:48:59 25 4
gpt4 key购买 nike

elisp 是否具有获取 url 和目的地并从 Internet 下载该 url 的功能?

我发现了 url-retrieveurl-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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com