Category Archives: Programming

Refreshing Firefox From, And Other Thoughts On, Emacs

When I’m working on Javascript or Django templates, I often want to test a change in the browser (usually Firefox), which entails refreshing.

As it turns out, it’s a pretty simple matter to do what I want, using just a couple of lines in my .emacs file, and a plug-in a piece for emacs and Firefox. This fine fellow lays out the steps on his blog. However, just to clarify his instructions a bit and spare you from a pitfall that hung me up for a couple of minutes, take note.

After you install MozRepl integration in emacs, it won’t start up until you open a javascript file. If you don’t start MozRepl or open a javascript file before you try to ctrl-x p, or you will get this error:

“Symbol’s function definition is void: comint-send-string”

Maybe I should need to test less often, but until then, this tool is going to be very handy. Here are some other improvements I’d like to make to my emacs:

  • figure out how to store the state of tabs/buffers when I close emacs
  • get lines numbers to show up on the left
  • autocomplete file opening, Quicksilver style, without needing to enter directories and tabs
  • aquamacs spawns tabs for auto complete and such… I wish those would automatically close
  • get javascript to color properly in HTML templates
  • also, django template coloring would be a nice bonus