index all rss twitter github linkedin email
Álvaro Ramírez

Álvaro Ramírez

24 November 2019 Wizard zines comics in Emacs eshell

Over at, Julia Evans authors wonderful zines on topics like git, networking, linux, command-line utilities, and others. Some zines are paid. Some are free. No affiliation here, just a fan.

A little while ago, Julia tweeted about a utility she's building to view her original comics on similar topics. I instantly thought it'd be a fun tool to implement for Emacs eshell.

Since then, I subscribed to and received a few comics (awk, tar, and bash tricks). I saved them locally (using topic name and dropping file extensions).

ls -1 ~/Downloads/wizardzines-comics/

By no means battle-tested, but here's an elisp snippet defining the ecomic command. It displays inlined comics in the handy eshell.

(require 'eshell)
(require 'iimage)

(defvar wizardzines-comics-path "~/Downloads/wizardzines-comics")

(defun eshell/ecomic (&rest args)
  "Display command comic in ARGS.
Note: ensure comic images live in `wizardzines-comics-path', named with
command name and no extension."
   "ecomic" args
   '((?h "help" nil nil "show this usage screen")
     :external "ecomic"
     :usage "COMMAND

Show COMMAND comic from Julia Evans'")
   (let* ((command (nth 0 (eshell-stringify-list (eshell-flatten-list args))))
          (image-fpath (concat (file-name-as-directory
                                (expand-file-name wizardzines-comics-path))
     (unless (file-exists-p image-fpath)
       (error "comic: \"%s\" not found :-(" command))
     (eshell-buffered-print "\n")
     (add-text-properties 0 (length image-fpath)
                          `(display ,(create-image image-fpath)
     (eshell-buffered-print image-fpath)


comments on twitter


  • Tweaked title.