Hacker News new | ask | show | jobs
by strongbond 1465 days ago
Your phrase 'Images are also possible' worries me. But then you go on to say 'All of this is trivial ...', which makes me feel a lot better.

I've had many well-intentioned but ultimately abortive attempts to get on board with Emacs.

So, are images 'possible' or 'trivial'? Not trolling, and I do note that you say it's not part of your workflow.

3 comments

You cannot embed images in Org documents. Or rather, you can, but would need to code the support for this for yourself. On the other hand, displaying images within the Org documents is trivial. You just need to have the image file saved somewhere. Then you insert a link to the image file and, with the default settings, you should be able to see the image rendered inline in the document. You can also generate the image from within the document. You write a ditaa code block, execute it, and the png with your UML (or whatever) is inserted or updated.

On the other hand: no, Emacs is not a WYSIWYG word processor. The need to support terminal as a display backend weights heavily on the pace of GUI improvements. That's because all interface elements need to be renderable on all backends (not strictly true, but the prejudice against GUI-only elements is significant). So if you hope to be able to easily and conveniently display something like this: https://klibert.pl/statics/vw-doc-view.png then Emacs is empathically not the best tool for the job.

eehh...

so (out of the box) in org mode if you type [[./file/path/to.png]] it will turn into a link, if you hit Ctrl-c-x-v it will toggle between showing images as a link (which will open in a new emacs buffer) and just showing the images inline.

ALSO you can just drag an image file onto an emacs window and it will display it in a new buffer.

however getting it so that A) images are displayed automatically when you finish typing the [[path]] and/or B) dragging an image into emacs will result in a new link in orgmode... that's probably possible

https://github.com/abo-abo/org-download

This is the package you're looking for. Just drag and drop images into the org mode buffer and you're done. I've been using it for years to take lecture / book notes in org mode where I have to constantly take screenshots and embed them in my notes.

that's part B.

part A is still annoying though. if you have inline images toggled and type in a new image it still turns into a link instead of an inline image.

That's an org mode setting, can be added to the #+startup declaration at the top of the file.
It’s as trivial as images in markdown, but there are more optional config options and extensions to, e.g., just paste from the clipboard.