How far can we take this? What is literate programming at the extreme?
I often draw when I need to work out an algorithm in my head. I wish there were a way to embed my doodles in code comments. Stuff like circle geometry are hard to explain without dense pixels. I've tried using various literate programming pre-processors that let me write comments in Markdown/HTML and embed whatever, but it makes my UNIX-minimalism-sense freak out, and it's super awkward having to render my source code to HTML and open a web browser to be able to read the comments properly…
Emacs org-mode supports a lot of languages [1] and you can mix and match within a file. Howard Abrams literate devops is an interesting example of what org-mode code blocks can do. [2][3]
Org-mode also allows embedding images or source blocks in languages like LaTeX that resolve to rendered images.
I've used artist-mode with my tablet PC, which works surprisingly well. You can draw with the stylus and everything!
For other ways to produce graphics from text (especially within Emacs), check out the examples in http://doc.norang.ca/org-mode.html#Publishing : ditaa, graphviz, plantuml... Cool stuff. =)
+1 for plantuml integration in org-mode. I have a university class teaching UML and it has been very helpful.
To get the true plantuml "UML IDE" experience, have the exported png open in a window (in the emacs sense) side-by-side with the code. Enable 'auto-revert-mode' on the image so that whenever you eval it it gets refreshed. If you run into problems where the image shows up in binary mode after reverting just enable 'auto-image-file-mode' (keeps it in image-mode).
You can also make it more "responsive" by setting the auto-revert-mode interval to something shorter (by default it checks every 5 seconds if the file has changed). I just defined a new 'fast-auto-revert-mode' function where it turns the mode on after let-ting the interval be 1 second, then added that as a hook for 'image-minor-mode-hook'.
You can also combine this with picture-mode[1] which gives a little bit more customisation of characters used. I'm always a bit sad that neither seems to allow you to achieve an extended ASCII 3D look though, e.g:
┌╖
╘╝
Otherwise emacs would be a brilliant level-designer for various ASCII RPGs of my youth.
I have used ditaa[1](warning: sourceforge) with artist-mode to mark some pretty-darn-good-looking system diagrams. It's a pretty impressive piece of work!
Um... that's what this post is about? artist-mode is an text art editor.
You don't need to use Emacs as an editor to use the "applications" built on Emacs, if that's your concern. Just as with any new application you'd have to learn how to use it.
Does anybody know of a similar vim plugin? I personally love ASCII diagrams, but there's quite a bit of friction involved in including them in docblocks.
I'll say what I said in another comment: Isn't it fine to just use Emacs for this purpose? You don't have to use it as a general-purpose text editor if all you want to do with it is make ASCII art. Just as with any new thing, you'd have to learn a bit, but not that much...
I often draw when I need to work out an algorithm in my head. I wish there were a way to embed my doodles in code comments. Stuff like circle geometry are hard to explain without dense pixels. I've tried using various literate programming pre-processors that let me write comments in Markdown/HTML and embed whatever, but it makes my UNIX-minimalism-sense freak out, and it's super awkward having to render my source code to HTML and open a web browser to be able to read the comments properly…