How to evaluate a single expression?

I am looking for the equivalent of C-x C-e in Emacs' Scheme mode. In Emacs the function eval-last-sexp gets evaluated. If you put the cursor on a closing parenthesis, the code up to the corresponding opening parenthesis gets evaluated. How to do this in DrRacket?


FWIW in racket-mode in Emacs, it's still C-x X-e.

Can't recommend racket-mode enough, if you are using Emacs.


You might want to set up a custom keybinding that does eval-last-sexp. See for more details.

1 Like

But it does not work as expected. See screen shot.

Where is the cursor here?

Before ( or after ) on line 3?

You may be looking for the select-send-sexpr quickscript. There are instructions for installing it here.