[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SOLVED] Re: [Feature Request] Hope Emacs can provide an async version o
[SOLVED] Re: [Feature Request] Hope Emacs can provide an async version of `url-copy-file'
Wed, 15 Jul 2020 13:40:14 +0800
mu4e 1.5.5; emacs 28.0.50
Narendra Joshi <email@example.com> writes:
> stardiviner <firstname.lastname@example.org> writes:
>> Because sometimes network is not good, so downloading might suspend Emacs
>> for a
>> long time. So I'm trying to implement an async downloading of
>> 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:
> #+begin_src emacs-lisp
> (make-thread (lambda () (url-copy-file "https://speed.hetzner.de/100MB.bin"
Thanks Narendra, this indeed is an great simple solution.
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
IRC(freenode): stardiviner, Matrix: stardiviner