[MLton-user] effectively tracking MLton error locations with emacs

Stephen Weeks MLton-user@mlton.org
Fri, 29 Oct 2004 18:58:49 -0700


Maybe lots of people know this, but it was new to me.  

An annoying problem that I have when using emacs functions to
automatically put the cursor at an error is that when visiting
multiple errors, once I edit the file, subsequent error locations are
off slightly (or even a lot) due to the edits.  I have to manually
look around to match up the error message text with the code.

It occurred to me today that a simple change to how the interaction
with emacs is done solves this problem.  Now, my emacs error
processing code looks at all the error messages that MLton outputs
(before I do any editing), and creates a marker for each one.  Then,
when I edit the code, emacs keeps track of the markers, and visiting
subsequent errors is as simple as visiting the marker.