Sunday, July 20, 2008

firefox and emacsclient




Sadly, mozex isn't working anymore for Firefox 3.0. I was looking at hacking it to make it work, and make it work better with Emacs, but then I found:

about:config view_source.editor.path

Unfortunately, this didn't seem to work with my emacsclient setup, until I found:

Emacs as default View Page Source / Greasemonkey editor in Firefox on Windows which tells us that Firefox will only accept a path as an argument to view_source.editor.path, no flags are allowed.

So, I just editted my "firefox-emacsclient" script to look like this:


#!/bin/sh
/usr/sness/emacs/bin/emacsclient -c -n -s sness $1


Then set:


view_source.editor.external true
view_source.editor.path firefox-emacsclient


and I can get beautiful source code viewed in Emacs. Nice.




1 comment:

Ryan McGuire said...

Thanks for the tip. I've been using ViewSourceWith and works quite well for not only viewing source(including HTML, JS, CSS) but also for editing textareas (using it now for this comment).

Keep the Emacs tips coming!