Racket: Using Emacs racket-mode

By Xah Lee. Date: . Last updated: .

You can use emacs to code Racket lisp. It works very well.

emacs racket mode 2015-10
Emacs racket-mode


Download racket-mode from MELPA. [see Emacs: How to Install Packages Using ELPA, MELPA].

When opening a file ending in .rkt, racket-mode will be activated.

Here's most useful commands.

Run Racket REPL in Emacs

Ctrl+c Ctrl+z racket-repl → switch to REPL. (start it if not started.)

Eval Code

Doc Lookup


Ctrl+Alt+i complete-symbol

To make the Tab key do completion, put the following in your emacs init then restart emacs. (yes, need to restart emacs, not just eval.)

;; make the tab key do indent AND completion
(set-default 'tab-always-indent 'complete)
[see Emacs: Tabs, Space, Indentation Setup]


Emacs has lots builtin features to edit lisp code, any lisp. See: How to Edit Lisp Code with Emacs .


When in racket-mode, call describe-mode to see a list of complete command and keys.

If you have a question, put $5 at patreon and message me.