markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

Download, cache, and display links to remote images

Open contrapunctus-1 opened this issue 7 years ago • 7 comments

It'd be nice if markdown-mode downloaded images from remote links, cached them and displayed them inline. Among other things, this would match the functionality of Markor on Android, and thus let one work with the same files on the phone and on the desktop (e.g. when synced via Syncthing).

contrapunctus-1 avatar Feb 09 '18 09:02 contrapunctus-1

@jrblevin do you know any other emacs package that does similar thing?

asok avatar Oct 20 '18 12:10 asok

I see that org-download does something similar. Too bad Emacs does not have this built in.

asok avatar Nov 01 '18 15:11 asok

See above. Are there test-cases I've missed? I've not been able to test with markup like ![alt][url]\n\n[url]: https://example.com/some.png.

vermiculus avatar Dec 29 '18 04:12 vermiculus

I came here because the book is on sale https://leanpub.com/markdown-mode/c/feb2019sale Currently I'm not using Emacs for Markdown but this looks really good. However it's a bit frustrating to read about features that are implemented but not yet released #385.

frankgerhardt avatar Mar 01 '19 02:03 frankgerhardt

@vermiculus thanks for working on this! I tried it out, and it seems to work decently - congratulations 🙂 It seems it's not asynchronous, though, so one has to wait until all the images in the file are loaded.

contrapunctus-1 avatar Jun 07 '19 05:06 contrapunctus-1

that would be a nice addition :-)

vermiculus avatar Jun 07 '19 14:06 vermiculus

If/when this is implemented, please provide a defcustom with two or three states. One state would support this new behaviour, another would disable it, and it would be nice to have a third that would only fetch resources with user input of some kind. Why?

There is a vocal group of people who would like to be able to view and edit markdown files without having to wonder "will viewing this file 'phone home' to a server somewhere". Also, within a Debian context it means this type of privacy-breach-generic link will become serious if links are fetched without user interaction, and a consequence of this would be patching or removal of all such links in provided markdown documentation. That's a lot of work, and I expect most upstream projects would not be happy with such an outcome.

sten0 avatar Apr 29 '20 22:04 sten0