From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Subject: Re: org-download.el Date: Sun, 18 Jan 2015 12:10:03 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCnpN-00032P-D9 for emacs-orgmode@gnu.org; Sun, 18 Jan 2015 06:15:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCnpM-0007aL-8j for emacs-orgmode@gnu.org; Sun, 18 Jan 2015 06:15:33 -0500 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:42058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCnpM-0007aH-1n for emacs-orgmode@gnu.org; Sun, 18 Jan 2015 06:15:32 -0500 Received: by mail-we0-f177.google.com with SMTP id l61so5193565wev.8 for ; Sun, 18 Jan 2015 03:15:30 -0800 (PST) In-Reply-To: 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: Chao Lu Cc: emacs-orgmode > 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