[racket] what kind of Racket editor operations would you like to see?

From: Richard Lawrence (richard.lawrence at berkeley.edu)
Date: Fri Jul 15 14:36:51 EDT 2011

Hi Neil,

I am an Emacs user, but have so far stuck with DrRacket as I learn
Racket; apologies if my suggestions are features that are already
available in Quack/Meow.

1. An operation that I always find myself wanting is something like
``wrap next sexp'' that would put parentheses around the next sexp and
position point inside the new open-parenthesis, like so (point marked
with `.'):

 . (some sexp goes in here)

After M-x wrap-next-sexp (or whatever key):
 (. (some sexp goes in here))

This would be extra useful with a prefix argument to wrap the next n
sexps, like:

 . (sexp one) 'two 3

After C-u 3 M-x wrap-next-sexp:

 (. (sexp one) 'two 3)

2.  I have no idea how difficult would it be to provide something like
DrRacket's macro stepper, but if that's on your list of possible
features, I'd suggest a familiar Emacs interface like the following:

M-x macro-stepper sends the current buffer to the macro stepper; this
opens a temporary, read-only buffer showing the output of the stepper
(or possibly two, one showing code before the step, one showing after).
This buffer would be in Meow mode or a related minor mode, to provide
syntax highlighting, and with bindings:

n - step forward
p - step backward
< - go to beginning
> - go to end
tab(?) - toggle macro hiding level (disable vs. standard)

That's all I can think of for the moment -- I look forward to seeing


Posted on the users mailing list.