Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-29 Thread Michael Albinus
Kit-Yan Choi writes: > But is it theoretically possible to have two remote file paths sharing > the same local copy file name? i.e. `make-temp-file' generates the > same temporary file name for two separate calls? No, never ever. After choosing a random file name, make-temp-file checks whether t

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-26 Thread Kit-Yan Choi
Thank you! These are interesting ideas! For both of these suggestions, I think I will need a look-up table using the remote file paths as keys, the local copy paths as values. But is it theoretically possible to have two remote file paths sharing the same local copy file name? i.e. `make-temp-f

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Michael Albinus
Kit-Yan Choi writes: > Michael, Hi Kit, > Thanks for the suggestion. Indeed `file-local-copy' would have made > the code cleaner. Yet `file-local-copy' generates a new filename each > time it's run. But I wanted to allow the code to check whether the > remote image has already been fetched befo

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Kit-Yan Choi
Michael, Thanks for the suggestion. Indeed `file-local-copy' would have made the code cleaner. Yet `file-local-copy' generates a new filename each time it's run. But I wanted to allow the code to check whether the remote image has already been fetched before and so skip unnecessary file transfe

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Michael Albinus
Kit-Yan Choi writes: > Ah my apologies. I forgot I had to use `file-name-directory' for > creating the path to the temporary directory (too long ago since I did > this). Here is the corrected version. > > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -19340,7 +19340,7 @@ boundaries." > (not (cdr (or

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Kit-Yan Choi
Ah my apologies. I forgot I had to use `file-name-directory' for creating the path to the temporary directory (too long ago since I did this). Here is the corrected version. --- a/lisp/org.el +++ b/lisp/org.el @@ -19340,7 +19340,7 @@ boundaries." (not (cdr (org-element-contents parent)

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Rasmus
Kit-Yan Choi writes: >> 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 wh

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Kit-Yan Choi
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 t

Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-25 Thread Nicolas Goaziou
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 > > .) Thanks for your patch. Howe

[O] [Patch] org-display-inline-images: Add support for remote images

2014-11-21 Thread Kit-Yan Choi
Hi, 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 .) I have tested the code with "make test". FSF document is sig