emacs - 使用 Emacs Lisp 下载文件

标签 emacs elisp

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/

相关文章:

emacs - 评估绑定(bind)到 emacs 中的键的函数时出现错误类型错误

emacs - 参数内的空格字符 (emacs lisp)

emacs - 您如何使用 Paredit 注释掉全部或部分 Lisp s-exp?

emacs - 如何从 Emacs 运行 cargo

emacs - 在 Emacs 中重新打开 *scratch* 缓冲区?

emacs - 如何在Emacs中运行Racket?

emacs - 如何在 emacs 中显示自动完成选项?

emacs - 选择窗口时做一些事情

emacs - 在 emacs 操作后保持选中区域

variables - 如何在 emacs org 模式下设置变量值?