2014-11-27: Hi, Hacker News! Remember, this post is from 2008 and predates Emacs 24.4. I hear EWW (Emacs Web Wowser?) is pretty cool and have been meaning to try it out. Anyway, on with the show!

“Are you browsing Slashdot in Emacs?”, W- asked me after he glanced at my screen.

With Emacs’ reputation for including everything _and_ the kitchen sink, you probably won’t be surprised to hear that there’s more than one way to surf the Internet using your text editor. With today’s Javascript- and image-heavy websites, it can be hard to believe that anyone would use a text-based browser with limited support for many of the things we take for granted. Still, a Web browser in your text editor can be surprisingly useful. Here are some of the reasons why you might like it:

Browsing is faster and less distracting. Forget flashing ads, garish colors, and large images. When you surf the Web in Emacs, you can focus on reading, and you can use all the typical Emacs shortcuts for navigating around. You can view images when you want to. If you need to see something that Emacs doesn’t support, you can easily open the current page in an external Web browser.

You can integrate it into your work. With a little bit of Emacs Lisp, you can quickly look up information on the Web based on what you’re currently working on. For example, PHP mode comes with a shortcut that lets you look up the current function’s documentation in the PHP manual. You can look up bug report details, dictionary definitions, and Wikipedia pages with minimal typing, too. If you use Emacspeak, you can set up the web browser to speech-synthesize more than what’s displayed on screen. The more you use Emacs, the more benefits you get from the integration.

You can customize everything. You can customize your Emacs experience quickly and easily, and if you spend a lot of time on the Net, you’ll appreciate having your own shortcuts and functions. For example, I’ve completely remapped my keyboard shortcuts to support tabbed browsing on a Dvorak keyboard, and I’ve defined a few functions to make frequently-used commands much easier. You can even use functions to process Web pages and either summarize the information you’re interested in or make pages more navigable. It’s all just Emacs Lisp.

You’re safe from browser exploits. No Javascript pop-ups, no image bugs, no browser-based malware that can take over your comuter or steal data. Just content.

You need less memory. Why open up a memory-intensive graphical Web-based browser when you’ve got Emacs open anyway?

There’s more than one way to browse the Web in Emacs, of course. Browse-url is a package that makes it easy to open URLs in your preferred browser or browsers. For example, you can use it to browse the Web in Mozilla Firefox, and (of course) you can use it to browse the Web within Emacs itself. For browsing within Emacs, you can use w3m.el, an interface to the external W3M browser, or w3, a Web browser written entirely in Emacs Lisp. Of the two, I prefer w3m.el, which is much faster and more featureful than w3. Both can display graphics, tables, and frames, and w3 supports stylesheets.

More about Emacs and browsing the Web soon! Planned projects for this chapter of Wicked Cool Emacs:

This isn’t browsing IN emacs, but if you haven’t seen them already, you should definitely check out conkeror (http://conkeror.org) and stumpwm (http://www.nongnu.org/stumpwm/). Both are by the same developer(s?), are “inspired by emacs”, and aim to be both keyboard driven and hackable – conkeror, a web browser, in javascript; and stumpwm, an X11 window manager, in common lisp and on the fly.

Both of these have made web browsing a LOT less jarring when I’m in full-on Emacs edit mode, even if it’s not an actual Emacs browser.

Pedro

Nice post! So, you also use the Dvorak keyboard layout. Could you care to say a little bit about your Dvorak setup with emacs? Did you remap any functions?

http://ludditegeek.blogspot.com/ Luddite Geek

And, you can waste time browsing the web and make it look like you’re working! :)

http://www.myrmidonprocess.com Fiona

I use Dvorak too, and although I liked emacs, I found that the keybindings were very unDvorak-friendly. (Although vi is even worse)
So I’d second the request that Pedro has posted.

http://samdanielson.com Sam

I am also a Dvorak user and I threw the defaults out since I don’t consider ctrl-p, ctrl-n, …, worth saving. As I am only slightly happier with my own design I’d like to see what you are using.

Recent comments

JohnKitchin Thanks. That matches my current understanding too. It seems like use-package pretty conveniently installs and configures packages. I have seen cask for creating and installing... – Emacs configuration and use-package