Hi, stardiviner <numbch...@gmail.com> writes:
> I found when network is bad and slow, or the download file is big, the > org-attach-url will suspend Emacs for a long time. User might have to cancel > downloading, and start again later. Indeed, this might be annoying. At the same time, it is not unreasonable to expect the user to know what size is the contents he is willing to attach to an Org node. > I hope to make "org-attach-url" download file asynchronously. But function > org-attach-attach hardcoded this function for 'url method. Here is a patch to > make it into an option. (FWIW, I could not find the patch.) I think you are on the right track when trying to enhance the 'url package. Maybe url-copy-file should be asynchronous and url could provide url-copy-file-synchronously (to mimic the url-retrieve and url-retrieve-synchronously pair)? Until Emacs has a function to copy a URL's contents asynchronously, I'd rather not add this functionality in Org. -- Bastien