From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kit-Yan Choi Subject: Re: [Patch] org-display-inline-images: Add support for remote images Date: Tue, 25 Nov 2014 10:15:57 -0500 Message-ID: References: <87vbm3of2o.fsf@selenimh.mobile.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11c3ec6c5837430508b063bc Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtHqS-00020R-TO for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 10:16:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtHqQ-0001XM-I1 for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 10:16:00 -0500 Received: from mail-qa0-x229.google.com ([2607:f8b0:400d:c00::229]:35250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtHqQ-0001XE-AR for emacs-orgmode@gnu.org; Tue, 25 Nov 2014 10:15:58 -0500 Received: by mail-qa0-f41.google.com with SMTP id f12so525352qad.14 for ; Tue, 25 Nov 2014 07:15:57 -0800 (PST) In-Reply-To: <87vbm3of2o.fsf@selenimh.mobile.lan> 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: Kit-Yan Choi , emacs-orgmode@gnu.org --001a11c3ec6c5837430508b063bc Content-Type: multipart/alternative; boundary=001a11c3ec6c58373b0508b063ba --001a11c3ec6c58373b0508b063ba Content-Type: text/plain; charset=UTF-8 Thank you for your comments! They are very helpful. > Thanks for your patch. However, I wonder if we really want this. Remote > images could be slow to fetch, and it would make buffer unusable. I personally needed this functionality. I have tried to reduce the amount of time spent on fetching the images by checking whether the images have been fetched before and whether the remote files are newer. Yes these communications take time as it should be expected if one opens an org file remotely (therefore connection should have been made) or when one specifies a remote image as path and wants to display it inline. Perhaps I could add an option flag or ask a question before fetching for user to decide whether to display remote images or not? In case the behaviour of displaying remote images inline is not desired? One scenario I can think of is that `org-startup-with-inline-images' is set to true and the file is sometimes visited remotely. Any opinion or comment on this, please? >> - (let ((file (expand-file-name (org-element-property :path link)))) >> + (let ((file (substitute-in-file-name (expand-file-name (org-element-property :path link))))) > Why is it needed? Because the file path for a remote file, as far as I have tested, have redundant slashes "/" at the beginning of the path which makes org-file-remote-p to return nil for a remote path. `substitute-in-file-name' corrects such path. `substitute-in-file-name' is also used in `org-open-file'. So I followed suit. > Are you sure the return value (a boolean, i.e., not necessarily > a string) should belong to the `concat'? Good point. I changed the code (see below, and attached). > (create-image (if (org-file-remote-p file) ...) > (and width 'imagemagick) > nil > :width width) I agree. Thanks. I made the code cleaner now (see below, and attached). @@ -19340,7 +19340,7 @@ boundaries." (not (cdr (org-element-contents parent))))) (org-string-match-p file-extension-re (org-element-property :path link))) - (let ((file (expand-file-name (org-element-property :path link)))) + (let ((file (substitute-in-file-name (expand-file-name (org-element-property :path link))))) (when (file-exists-p file) (let ((width ;; Apply `org-image-actual-width' specifications. @@ -19378,10 +19378,24 @@ boundaries." 'org-image-overlay))) (if (and (car-safe old) refresh) (image-refresh (overlay-get (cdr old) 'display)) - (let ((image (create-image file - (and width 'imagemagick) - nil - :width width))) + (let ((image + (create-image (if (org-file-remote-p file) + (let* ((tramp-tmpdir (concat + (if (featurep 'xemacs) + (temp-directory) + temporary-file-directory) + "/tramp")) + (newname (concat + tramp-tmpdir + (expand-file-name file)))) + (make-directory tramp-tmpdir t) + (if (file-newer-than-file-p file newname) + (copy-file file newname t t)) + newname) + file) + (and width 'imagemagick) + nil + :width width))) (when image (let* ((link ;; If inline image is the description On Tue, Nov 25, 2014 at 3:32 AM, Nicolas Goaziou wrote: > Hello, > > Kit-Yan Choi writes: > > > I would like to submit a patch to support displaying remote images inline > > in Org-mode. Attached is the formatted patch (or github branch here > > < > https://github.com/kitchoi/org-mode/commit/2e600da455c371754f028ddaaed1ae1724cbe6b6 > > > > .) > > Thanks for your patch. However, I wonder if we really want this. Remote > images could be slow to fetch, and it would make buffer unusable. > > > Feedbacks are most welcome. Thanks. > > Some comments follow. > > > - (let ((file (expand-file-name (org-element-property :path > link)))) > > + (let ((file (substitute-in-file-name (expand-file-name > (org-element-property :path link))))) > > Why is it needed? > > > + (let* ((image > > + (let ((newname > > + (if (org-file-remote-p file) > > + (let* ((tramp-tmpdir (concat > > + (if > (featurep 'xemacs) > > + > (temp-directory) > > + > temporary-file-directory) > > + "/tramp" > > + > (org-file-remote-p file) > > ^^^^^^^^^^^^^^^^^^^^^^^^ > Are you sure the return value (a boolean, i.e., not necessarily > a string) should belong to the `concat'? > > > + > (file-name-directory > > + > (org-babel-local-file-name file)))) > > + (newname (concat > > + tramp-tmpdir > > + > (file-name-nondirectory file)))) > > + (make-directory tramp-tmpdir t) > > + (if > (tramp-handle-file-newer-than-file-p file newname) > > + (tramp-compat-copy-file > file newname t t)) > > + newname) > > + file))) > > + (create-image newname > > + (and width 'imagemagick) > > + nil > > + :width width)))) > > IMO, it is clearer to use > > (create-image (if (org-file-remote-p file) ...) > (and width 'imagemagick) > nil > :width width) > > > > Regards, > > -- > Nicolas Goaziou > --001a11c3ec6c58373b0508b063ba Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you for your comments!=C2=A0 They are very helpful.<= div>
> Thanks for your patch. However, I wonder if we real= ly want this. Remote
> images could be slow to fetch, and it would = make buffer unusable.

I personally needed this funct= ionality.=C2=A0 I have tried to reduce the amount of time spent on fetching= the images by checking whether the images have been fetched before and whe= ther the remote files are newer.=C2=A0 Yes these communications take time a= s it should be expected if one opens an org file remotely (therefore connec= tion should have been made) or when one specifies a remote image as path an= d wants to display it inline.
Perhaps I could add an option flag = or ask a question before fetching for user to decide whether to display rem= ote images or not?=C2=A0 In case the behaviour of displaying remote images = inline is not desired?=C2=A0 One scenario I can think of is that `org-start= up-with-inline-images' is set to true and the file is sometimes visited= remotely. =C2=A0
Any opinion or comment on this, please?

>> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((file = (expand-file-name (org-element-property :path link))))
>> +=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((file (substitute-in-file-name (expand-fi= le-name (org-element-property :path link)))))
> Why is it needed?

Because the file path for a remote file, as far as I = have tested, have redundant slashes "/" at the beginning of the p= ath which makes org-file-remote-p to return nil for a remote path.
`substitute-in-file-name' corrects such path. =C2=A0`substitute-in-fi= le-name' is also used in `org-open-file'.=C2=A0 So I followed suit.=

> Are you sure the return value (a boolean, i.= e., not necessarily
> a string) should belong to the `concat'?<= div>
Good point.=C2=A0 I changed the code (see below, and att= ached).

> =C2=A0(create-image (if (org-file-rem= ote-p file) ...)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0(and width 'imagemagick)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0nil
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0:width width)

I agree.=C2=A0 Thanks.=C2= =A0 I made the code cleaner now (see below, and attached).


@@ -19340,7 +19340,7 @@ boundaries= ."
=C2=A0 =C2=A0 =C2=A0(not (cdr (org-element-contents paren= t)))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(org-string-match-p file-extensi= on-re
=C2=A0 =C2=A0(org-element-property :path link)))
- =C2=A0 =C2=A0 (let ((file (expand-file-name (org-element-property :path l= ink))))
+ =C2=A0 =C2=A0 (let ((file (substitute-in-file-name (expan= d-file-name (org-element-property :path link)))))
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 (when (file-exists-p file)
=C2= =A0 (let ((width
<= div class=3D"gmail_extra">=C2=A0= ;; Apply `org-image-actual-width' specifications.
@@ -19378,10 +19378,24 @@ boundaries."
=C2=A0 <= /span> =C2=A0 =C2=A0 'org-image-overlay)))
=C2=A0 =C2=A0 (if (= and (car-safe old) refresh)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (image-ref= resh (overlay-get (cdr old) 'display))
= - =C2=A0 =C2=A0 (let ((= image (create-image file
- =C2=A0(and width 'imagemagick)<= /div>
- =C2=A0nil
- =C2=A0:width width)))
+ = =C2=A0 =C2=A0 (let ((image=C2=A0
+ =C2=A0 =C2=A0(create-image (if= (org-file-remote-p file)
+ =C2=A0 =C2=A0 =C2=A0(let* ((tramp-t= mpdir (concat
+ =C2=A0 =C2=A0(if (featurep 'xemacs)
+ = (temp-directory)
+ =C2=A0 =C2=A0 =C2=A0tempora= ry-file-directory)
+ =C2=A0 =C2=A0"/tramp"))
+ = =C2=A0 =C2=A0 (newname (concat
+= =C2=A0 =C2=A0 =C2= =A0 tramp-tmpdir=C2=A0
+ =C2=A0 =C2=A0 =C2=A0 (expand-file-na= me file))))
+ (make-directory tramp-tmpdir t)
+ (= if (file-newer-than-file-p file newname)
+<= span class=3D"" style=3D"white-space:pre"> =C2=A0 =C2=A0(copy-= file file newname t t))
+ newname)
+ =C2=A0 =C2=A0f= ile)
+ =C2=A0(and width 'imagemagick)
+ =C2=A0n= il
+ =C2=A0:width width)))
=C2= =A0 =C2=A0 =C2=A0 =C2= =A0 (when image
=C2=A0 (let* ((link
=C2=A0 ;; If inlin= e image is the description



On Tue, Nov 25, 2014 at 3:32 AM, Nicolas Goaziou <= mail@nicolasgoa= ziou.fr> wrote:
Hello,

Kit-Yan Choi <kit@kychoi.org> w= rites:

> I would like to submit a patch to support displaying remote images inl= ine
> in Org-mode.=C2=A0 Attached is the formatted patch (or github branch h= ere
> <https://github.com/k= itchoi/org-mode/commit/2e600da455c371754f028ddaaed1ae1724cbe6b6>
> .)

Thanks for your patch. However, I wonder if we really want this. Remote
images could be slow to fetch, and it would make buffer unusable.

> Feedbacks are most welcome.=C2=A0 Thanks.

Some comments follow.

> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((file (expand-file-name (org= -element-property :path link))))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((file (substitute-in-file-na= me (expand-file-name (org-element-property :path link)))))

Why is it needed?

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let* = ((image
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 (let ((newname
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (org-file-remote-p fil= e)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((tram= p-tmpdir (concat
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (feat= urep 'xemacs)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(temp-directory)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0te= mporary-file-directory)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"/tr= amp"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-file= -remote-p file)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^^^^^= ^^^^^^^^^^^^^^^^^^^
Are you sure the return value (a boolean, i.e., not necessarily
a string) should belong to the `concat'?

> +=C2=A0 =C2=A0 =C2=A0 =C2=A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2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make= -directory tramp-tmpdir t)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (= tramp-handle-file-newer-than-file-p file newname)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(tramp-compat-copy-file file newname t t))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0newna= me)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0file)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (create-image newname
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (and width 'imagemagick)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 nil
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 :width width))))

IMO, it is clearer to use

=C2=A0 (create-image (if (org-file-remote-p file) ...)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and width 'ima= gemagick)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :width width)



Regards,

--
Nicolas Goaziou

--001a11c3ec6c58373b0508b063ba-- --001a11c3ec6c5837430508b063bc Content-Type: text/plain; charset=US-ASCII; name="0001-org.el.diff" Content-Disposition: attachment; filename="0001-org.el.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i2xeo2ys0 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLmVsIGIvbGlzcC9vcmcuZWwKaW5kZXggNmFiMTNmNC4uOTZi MDRiNiAxMDA3NTUKLS0tIGEvbGlzcC9vcmcuZWwKKysrIGIvbGlzcC9vcmcuZWwKQEAgLTE5MzQw LDcgKzE5MzQwLDcgQEAgYm91bmRhcmllcy4iCiAJCQkgICAgKG5vdCAoY2RyIChvcmctZWxlbWVu dC1jb250ZW50cyBwYXJlbnQpKSkpKQogCQkgICAgICAob3JnLXN0cmluZy1tYXRjaC1wIGZpbGUt ZXh0ZW5zaW9uLXJlCiAJCQkJCSAgKG9yZ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