From mboxrd@z Thu Jan 1 00:00:00 1970 From: "briangpowell ." Subject: Re: Displaying remote images Date: Fri, 29 Nov 2019 00:36:10 -0500 Message-ID: References: <8736e8sza3.fsf@gmail.com> <87tv6nsaqh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000025c6ad0598759c64" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaYxD-0003pv-21 for emacs-orgmode@gnu.org; Fri, 29 Nov 2019 00:36:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaYx6-0001Jb-Hm for emacs-orgmode@gnu.org; Fri, 29 Nov 2019 00:36:27 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:52259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iaYx6-0001Bl-6a for emacs-orgmode@gnu.org; Fri, 29 Nov 2019 00:36:24 -0500 Received: by mail-wm1-x334.google.com with SMTP id l1so12863992wme.2 for ; Thu, 28 Nov 2019 21:36:23 -0800 (PST) In-Reply-To: <87tv6nsaqh.fsf@gmail.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" To: Jack Kamm Cc: emacs-orgmode --00000000000025c6ad0598759c64 Content-Type: text/plain; charset="UTF-8" * Great, see a lot of interest and use of image-mode.el, suggest you check out this thread https://emacs.stackexchange.com/questions/3432/display-images-in-eshell-with-iimage-mode ** Suggest you check out and use iimage-mode.el --it may help ...that's iimage-mode.el rather than, or in addition to, your use of image-mode.el On Thu, Nov 28, 2019 at 9:20 PM Jack Kamm wrote: > I've attached a patch which implements displaying remote images. > > > This is a longstanding problem, and there was an attempt to patch it in > > 2014, but the patch was never accepted: > > https://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00583.html > > Compared to the previous attempt from 2014, I think my patch is simpler > -- it doesn't require creating any temp files. > > > The fault might be with image.el rather than with org-mode itself -- > > for example, when I execute the following elisp, I get the same blank > > box: > > After doing some reading, I learned that image.el doesn't really create > the image. Instead, create-image simply creates a blank string with a > text property pointing to the image file location, and the rendering of > the image gets handled later by the C code (for example, png_load_body() > in image.c), which doesn't know how to read remote image files. > > Since I wasn't comfortable trying to get the C code to read the remote > file, I instead took the approach used by image-mode.el, which reads the > remote image file and passes its contents directly to create-image, > instead of just passing the filename. > > --00000000000025c6ad0598759c64 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

* Great, see a lot of= interest and use of image-mode.el, suggest you check out this thread
=

https://emacs.stackexchange.com/qu= estions/3432/display-images-in-eshell-with-iimage-mode
** Suggest you check out and use iimage-mode.el --it may help = ...that's iimage-mode.el rather than, or in addition to, your use of im= age-mode.el



On Thu, Nov 28, 2019 at 9:20 PM Ja= ck Kamm <jackkamm@gmail.com>= ; wrote:
I'v= e attached a patch which implements displaying remote images.

> This is a longstanding problem, and there was an attempt to patch it i= n
> 2014, but the patch was never accepted:
> https://lists.gnu.org/arc= hive/html/emacs-orgmode/2014-11/msg00583.html

Compared to the previous attempt from 2014, I think my patch is simpler
-- it doesn't require creating any temp files.

> The fault might be with image.el rather than with org-mode itself -- > for example, when I execute the following elisp, I get the same blank<= br> > box:

After doing some reading, I learned that image.el doesn't really create=
the image. Instead, create-image simply creates a blank string with a
text property pointing to the image file location, and the rendering of
the image gets handled later by the C code (for example, png_load_body() in image.c), which doesn't know how to read remote image files.

Since I wasn't comfortable trying to get the C code to read the remote<= br> file, I instead took the approach used by image-mode.el, which reads the remote image file and passes its contents directly to create-image,
instead of just passing the filename.

--00000000000025c6ad0598759c64--