Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Emacs Artist Mode (cinsk.org)
118 points by brudgers on Sept 25, 2015 | hide | past | favorite | 26 comments


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.

[1]: http://orgmode.org/worg/org-contrib/babel/languages.html

[2]: http://www.howardism.org/

[3]: https://www.youtube.com/watch?v=dljNabciEGg


you might be interested in http://monodraw.helftone.com, lots of diagramming in plain text.


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.

[1]: http://www.gnu.org/software/emacs/manual/html_node/emacs/Pic...


It feels strange that I need to install Adobe Flash Player to watch a screencast on Emacs.

Wait... is there an Emacs mode for this?


I'm surprised people still use it, what is Flash still usefull for ? deploy malwares ?


Homestar Runner.

Also, Orisinal: http://www.ferryhalim.com/orisinal


I'm more interested in knowing what was used to toggle in and out of the mode that made everything but the comment disappear!


Narrowing. Read all about it: C-x n C-h

Narrowing to defun is particularly useful. It usually knows what "defun" means in language.


I love Emacs


Don't, you may catch something. RSI appears to be going around.


Are we doing the flame war thing on Friday night? I mean if we are, I'm up for it. Are we?


I use Spacemacs, so does that mean I'm safe? :)


Lol using Emacs doesn't mean you'll have to hit a lot of Ctrl. It allows you to customize everything then obviously Evil is the sensible way to go.


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!

[1] http://ditaa.sourceforge.net/


I couldn't watch the video on my tablet (video is flash), but I found this youtube video that also talks about artist mode:

http://www.youtube.com/watch?v=cIuX87Xo8Fc


This reminds me of TempleOS

https://youtu.be/sm-W4Tzg9-o?t=662


Somewhat off-topic: I have been looking for an ANSI art editor for the terminal (Linux or OS X).

Anyone know of anything?


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.


"figlet" might be what you're looking for.


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...


Don't think Vim is much interested in mouse functionalities at all. Just use Emacs to create diagrams. It'll be fine.


Thought many people already knew it well. A convenient feature of Emacs no doubt.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: