Hi Oleh,

Thanks a lot for the detailed instruction again, and the screencast is a
good job as well! I just did the testing. Please see below.

1. Have you made any customizations to `org-download`? It's easier for
me to proceed with the defaults.

*-- No, all I did is (require 'org-download)*

2. As I'm testing now, I can get a "Wrong type argument:
   number-or-marker-p, nil" error if the org-mode file in question is
   empty or the cursor is before the first heading. Is this the case for
you?
   I'll fix this case soon anyway.
-- *Not really, I made a test.org <http://test.org> then insert some
heading, then tried (org-download-yank) with the web address on top of
kill-ring, which did not trig the download events as well.*

3. If this doesn't work, try the following simplified function:

    (defun org-download-yank-1 ()
      (interactive)
      (let ((filename "./foo.png"))
        (org-download--image
         "https://www.google.nl/images/srpr/logo11w.png";
         filename)
        (insert (format "[[%s]]" filename))
        (org-display-inline-images)))



*-- This one works! The google logo gets into my test.org <http://test.org>
buffer, which is a good signal~*
Please let me know if there's any further instruction. And thanks for the
help~~

Best,

Chao


On Sun, Jan 18, 2015 at 6:10 AM, Oleh <ohwoeo...@gmail.com> wrote:

> > Thanks for the detailed instruction. I just checked following your
> advice,
> > by copying the address of the image (and by looking at the browser-ring,
> I
> > can make sure the address has been there), then M-x org-download-yank,
> > returns error: "if: Wrong type argument: number-or-marker-p, nil".
> >
> > Also I tried (org-download-yank "the-address-to-the-image"), which does
> not
> > work either.
> >
> > Do you have any insight? Thanks.
>
> Alright, we're getting somewhere now.
>
> 1. Have you made any customizations to `org-download`? It's easier for
> me to proceed with the defaults.
> 2. As I'm testing now, I can get a "Wrong type argument:
>    number-or-marker-p, nil" error if the org-mode file in question is
>    empty or the cursor is before the first heading. Is this the case for
> you?
>    I'll fix this case soon anyway.
> 3. If this doesn't work, try the following simplified function:
>
>     (defun org-download-yank-1 ()
>       (interactive)
>       (let ((filename "./foo.png"))
>         (org-download--image
>          "https://www.google.nl/images/srpr/logo11w.png";
>          filename)
>         (insert (format "[[%s]]" filename))
>         (org-display-inline-images)))
>
> If this one doesn't work as well, I can proceed from there.
>
> regards,
> Oleh
>

Reply via email to