W3m with Emacs on OSX

Why would you want to do this? (You probably don’t :P)

In my case, I have a similar setup on a Linux box, and I like consistency, so …

  • Get w3m. I used MacPorts, you can use brew, it’s really up to you. If you’re using the former, run sudo port install w3m (assuming, of course, that you’ve installed MacPorts).

  • Get emacs-w3m: Run M-x package-install w3m (or select it from M-x list-packages)

Unfortunately, Emacs doesn’t seem to be very good with dependencies, so before installing w3m you’ll also have to manually install mew (I found this in the package repository) and apel (which I had to install the “old-fashioned” way — get this tarball, then run make and sudo make install … though if you find a better way please let me know!)

  • Now you can run M-x w3m, and you should see something like this (after navigating to google.com:
Emacs w3m
Emacs w3m

Here are a few keyboard shortcuts to get you started:

C-t T => Open a new session
g => Open URL
C-c C-s => Browse open sessions
C-c C-c => Submit form
Tab => Next link

You can navigate either using C-p, C-n, C-a, C-e or else (vim-style) using j, k, l, h.


1 thought on “W3m with Emacs on OSX”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s