emacs w3m about pages

If you use w3m within emacs you might be interested to know you can do this:

(defun w3m-about-foobar (&rest args)
  "Hang a emacs generated page on this url: about://foobar/"
    (format "<p>This is so exciting, you have %d buffers!</p>"
            (length (buffer-list))))
  (insert "<img src=\"http://ergoemacs.org/emacs/i/emacs_learning_curves.png\"/>")

Which means you can build entire pseudo web sites that are local to your emacs :).

I got to wondering about how I might do this because I use w3m to view Lisp documentation[1], and I have this little slime contribution (slime-documentation-search.el) that adds an easy way to search quickdocs.org. ¬†As you can see if you look there are at least four alternatives to quickdocs.org; and I’ve been wondering if I could puzzle out a way to create little website that would let you browse between them.

The trick above looks like it could help, but the obvious approach doesn’t work because w3m doesn’t support iframes. ¬†Exercise for the reader, I guess.

Leave a Reply

Your email address will not be published. Required fields are marked *