Pancake is a CLI/Emacs web/gopher/file browser.

It utilizes pandoc and external downloaders such as curl, adding support for Gopher directories and plain text files, invoking external applications (e.g., image and PDF viewers) depending on its configuration, and transforming HTML documents using user-defined XSLTs. The focus is on efficient information retrieval.

User interaction capabilities are rather basic, as it is intended to be combined with software that provides better user interfaces – such as emacs, tmux, screen.

See README for more information. Breaking changes are possible between 0.1.x releases; see ChangeLog and git log for recent changes.

1 Other text-based web/gopher browsers

Wikipedia lists a few major text-based web browsers, including Emacs-based ones. Pancake provides a combination of the things I liked about those, and the ones I have missed in those:

  • Multi-protocol support (via curl or other pluggable downloaders).
  • Multi-format support (via pandoc and additional readers).
  • Plain CLI.
  • An Emacs interface without unnecessary blocking, and general support for embedding.
  • Simplicity and small codebase, thanks to reusing the programs mentioned above.
  • Efficient UI.
  • Use of external programs to handle file types which it doesn't support.
  • XSLT-based HTML document uncluttering.

There are some drawbacks as well:

  • A large executable file (about 90 Mio uncompressed).
  • Not as hackable in Elisp as pure (or mostly) Elisp browsers.
  • Not as portable as C or Elisp ones.
  • A relatively small set of features.
  • Somewhat worse HTML parsing and rendering in some cases.
  • No HTML form input support.
  • Quite possibly more, depending on one's preferences.

2 Installation

2.1 Pancake

cabal install would build and install pancake and its documentation. Alternatively, basic Debian packages and binary releases are available.

2.2 Emacs interface

M-x package-install-file RET /path/to/pancake.el RET. To set it as your default emacs browser:

(require 'pancake)
(setq browse-url-browser-function 'pancake)

To load and show all images automatically (not just after saving them manually):

(add-hook 'pancake-display-hook 'pancake-load-images)

Though it might be desirable to write a wrapper to only show those on specific websites, e.g. webcomics, and perhaps specific images only.

3 Screenshots