Mark Slagell <ms / iastate.edu> writes:

> > then highlight it, hit Alt-F10, and the comments showing the values
> > are automatically inserted.
> 
> Cool idea - but doesn't happen for me for some reason.  I'm in ruby mode
> - what might I be missing?  I just get the error bell.

Ah, you're missing my trivial emacs function:

   (defun ruby-xmp-region (reg-start reg-end)
      "Pipe the region through Ruby's xmp utility and replace the region with
       the result."
      (interactive "r")
      (shell-command-on-region reg-start reg-end
                               "ruby -r xmp -n -e 'xmp($_, \"%l\t\t# %r\n\")'"
                               t))

   (global-set-key [(meta f10)] 'ruby-xmp-region)


All hail emacs.


Dave