If anyone else wants to do this, here are the various pieces.
First, follow Steve's pointers above.
Second, if you have GNU Emacs version 23 *and* you are on a Mac,
you need to follow this thread:
http://lists.gnu.org/archive/html/help-gnu-emacs/2011-02/msg00204.html
It changes the new Cocoa based NextStep Emacs back to being Carbon
based (those terms may be all screwed up because I don't really get
what the
difference is). If you have GNU Emacs version 22, you don't need to
do this.
Third, you need this little snippet that I developed a while back:
http://groups.google.com/group/merb/browse_thread/thread/b647138d9fe79a74
Fourth, get an error stack trace after all this and click on it.
Firefox will ask you which
application to spawn and point it towards Emacs.app. I think in my
case, I
already had a txmt protocol entry in my Firefox config. If you need
help setting up
that part of it, there are "How Tos" on the net but they are kinda
hard to find.
What this gives you is what is mostly a normal development stack in
the browser
window but the lines for the stack have hyperlinks that use "txmt" as
their protocol.
FF can be taught to send that to emacs. On the Mac, it does this via
Apple Events.
The changes in part 2 allow emacs to receive Apple Events (or more of
them
perhaps) and the snippet from part 3 is where the event gets
interpreted to
be a specific file and line number.
If you are not running on a Mac, I don't know how Firefox sends the
request
to another application. It may just do a fork / exec. It may be that
the
better place to send it in that case is emacsclient.