[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Drag images from Firefox to org-mode
From: |
Nicolas Richard |
Subject: |
Re: [O] Drag images from Firefox to org-mode |
Date: |
Thu, 17 Oct 2013 16:48:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Rick Frankel <address@hidden> writes:
> On 2013-10-17 08:43, Nicolas Richard wrote:
>> Carsten Dominik <address@hidden> writes:
>> does anyone know how general this code is? Does it works on
>> different operating systems?
>> We might want to include this into the Org core.
>>
>> Since it is based on dnd, and since the documentation of dnd reads:
>> ;; This file provides the generic handling of the drop part only.
>> ;; Different DND backends (X11, W32, etc.) that handle the platform
>> ;; specific DND parts call the functions here to do final delivery of
>> ;; a drop.
>> I'd highly suspect that the code is portable.
>
> It does make use of `wget', which may not be avalalable on all systems
> (e.g., i believe os x only includes `curl' by default.) So it would
> need to allow configuration of the image fetch command.
I'm sorry I missed that. Indeed, on the one "OS X" I ever tried to run
wget on, it didn't have wget.
Perhaps url-retrieve can be used instead. I have no time right now to
code it right, but here's a (synchronous) example with url + filetype +
filename all hardcoded :
(with-current-buffer
(url-retrieve-synchronously
"http://www.cnrtl.fr/images/css/bandeau.jpg")
(delete-region
(point-min)
(progn
(re-search-forward "^$" nil 'move)
(point)))
(write-file
(expand-file-name "~/tmp/foobar.jpg"))
(pop-to-buffer
(current-buffer)))
using url-retrieve (which is asynchroneous) might also lift the
requirement on async.el
--
Nico.
Re: [O] Drag images from Firefox to org-mode, Carsten Dominik, 2013/10/17
- Re: [O] Drag images from Firefox to org-mode, Nicolas Richard, 2013/10/17
- Re: [O] Drag images from Firefox to org-mode, Rick Frankel, 2013/10/17
- Re: [O] Drag images from Firefox to org-mode,
Nicolas Richard <=
- Re: [O] Drag images from Firefox to org-mode, Rick Frankel, 2013/10/17
- Re: [O] Drag images from Firefox to org-mode, Nicolas Richard, 2013/10/18
- Re: [O] Drag images from Firefox to org-mode, Rick Frankel, 2013/10/18
- Re: [O] Drag images from Firefox to org-mode, Nicolas Richard, 2013/10/18
Re: [O] Drag images from Firefox to org-mode, Oleh, 2013/10/18
Re: [O] Drag images from Firefox to org-mode, Nicolas Richard, 2013/10/18
Re: [O] Drag images from Firefox to org-mode, Oleh, 2013/10/18
Re: [O] Drag images from Firefox to org-mode, Nicolas Richard, 2013/10/18