emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: stardiviner <numbchild@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] make org-attach-url download function as an option
Date: Sun, 24 May 2020 16:01:07 +0200	[thread overview]
Message-ID: <87pnatl9ek.fsf@bzg.fr> (raw)
In-Reply-To: <87zhaupfl6.fsf@gmail.com>

Hi,

stardiviner <numbchild@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


  reply	other threads:[~2020-05-24 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 13:49 stardiviner
2020-05-24 14:01 ` Bastien [this message]
2020-05-25  0:12   ` stardiviner
2020-07-15  9:05   ` [QUESTION] " stardiviner
2020-07-16  0:52     ` Ihor Radchenko
2020-07-16 22:54       ` stardiviner
2020-07-16 23:20         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pnatl9ek.fsf@bzg.fr \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    --subject='Re: [PATCH] make org-attach-url download function as an option' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).