From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Subject: Re: Drag images from Firefox to org-mode Date: Fri, 18 Oct 2013 21:22:17 +0200 Message-ID: References: <87eh7irjvi.fsf@yahoo.fr> <52610C29.3000505@yahoo.fr> <526114B4.6060303@yahoo.fr> <2d5635af9ad6d51badb40e1e19c85572@mail.rickster.com> <87y55qpp44.fsf@yahoo.fr> <857b1a922e24dda4404df4d19fabd7e2@mail.rickster.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b624d3441537c04e908da7b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXFcp-00039D-MX for emacs-orgmode@gnu.org; Fri, 18 Oct 2013 15:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXFco-0005WA-K8 for emacs-orgmode@gnu.org; Fri, 18 Oct 2013 15:22:19 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:42065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXFco-0005Vo-Az for emacs-orgmode@gnu.org; Fri, 18 Oct 2013 15:22:18 -0400 Received: by mail-wg0-f41.google.com with SMTP id b13so2461681wgh.0 for ; Fri, 18 Oct 2013 12:22:17 -0700 (PDT) In-Reply-To: <857b1a922e24dda4404df4d19fabd7e2@mail.rickster.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rick Frankel Cc: Nicolas Richard , org mode --047d7b624d3441537c04e908da7b Content-Type: text/plain; charset=ISO-8859-1 Thanks, Rick and Nico, I've merged the code. All except the last bit from Rick: I can't think of any sensible way to enter an image URL except pasting it. And since link will be in the clipboard at some point, why not use it straight away without prompting. Maybe URL can be prompted for when called with a prefix arg, but I don't know how to do that yet. regards, Oleh On Fri, Oct 18, 2013 at 8:24 PM, Rick Frankel wrote: > On 2013-10-18 11:36, Nicolas Richard wrote: > >> Note that using >> (let ((coding-system-for-write 'no-conversion)) >> (write-region nil nil filename nil nil nil 'confirm)) >> instead of >> (write-file ...) >> seemed to fix the problem for Oleh. >> > > Attached is a patch against Nico's url-retrieve-alt which cleans-up > some issues w/ the defcustoms and make the interactive version of > `org-download-image' prompt for a url instead of attempting to use the > clipboard (which kept throwing errors for me). At least in my environment > (Chrome -> cygwin emacs on Windows NT),DND doesn't work on windows. > > It also uses url-parse to get the image file name, as images with > cache-busters were failing to download (e.g. > http://example.com/image.jpg?**20120101 > ). > > Again, sorry I can't do a branch and pull request, don't have push > access to github from here. > > rick --047d7b624d3441537c04e908da7b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks, Rick and Nico, I've merged the code.

<= div>All except the last bit from Rick: I can't think of any sensible
way to enter an image URL except pasting it.
And since li= nk will be in the clipboard at some point, why not use
it straight away without prompting.

Maybe URL= can be prompted for when called with a prefix arg,
but I don'= ;t know how to do that yet.

regards,
Oleh
--047d7b624d3441537c04e908da7b--