[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Feature Request] Hope Emacs can provide an async version of `url-co
Re: [Feature Request] Hope Emacs can provide an async version of `url-copy-file'
Thu, 09 Jul 2020 22:19:52 +0200
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
stardiviner <email@example.com> writes:
> Because sometimes network is not good, so downloading might suspend Emacs for
> long time. So I'm trying to implement an async downloading of `org-attach-url'
> in org-mode. But it require async version of `url-copy-file', write redundant
> code is not useful. Also I'm not able to implement that. So I send email for
> feature request here.
> Thanks in advance.
Would using threads work for your use case given that it's network
I/O. For example, this downloads a large file without blocking Emacs:
(make-thread (lambda () (url-copy-file "https://speed.hetzner.de/100MB.bin"