Next: , Previous: Terse Command Face, Up: Faces


2.5.2 Emacs Face

Using THUD in an Emacs buffer is possible with the emacs-face. This requires cooperation from Emacs by loading inf-thud.el and typing M-x inf-thud. The buffer is placed into inferior-thud mode, described in this section.

To avoid horrible confusion, we distinguish between Elisp and and Scheme worlds by explicitly marking elisp commands, procedures and variables as "Elisp".

— Procedure: emacs-face

Begin emacs interaction repl. Enter EOF to quit. [At this time, we use a simple repl, but this may grow hair in the future.]

See Command-line processing, for info on how to specify emacs-face.

— Elisp Command: inf-thud

Start a THUD process in buffer *inf-thud* and go into Inferior THUD mode. A prefix arg allows editing of the THUD command line before invocation. THe default command line is thud --face emacs.

If "–face emacs" is recognized in the command line, Emacs actually goes into a submode that makes use of single character commands. The mode line shows "THUD:Emacs" when this occurs.

If "–face emacs" is not recognized in the command line, Emacs goes into a standard comint-based submode where you generally type stuff into the buffer followed by RET to send the input to THUD. The mode line shows "THUD:Comint" in this case.

The rest of this section documents the "THUD:Emacs" submode. See Shell Mode, for more info on the standard comint mode.

In THUD:Emacs submode, several commands are available, most of which are bound to mnemonic key sequences.

,
Read a string in the minibuffer and send it to THUD as a Scheme expression to evaluate. Before sending, the string is inserted in the current buffer (as a way of recording it). The underlying command is named inf-thud-send-string.
!
Call shell-command.
:
Read a string in the minibuffer and send it to THUD as a terse command to execute. This calls inf-thud-send-string (with its attendant buffer-modifying behavior).
x
Read a file name in the minibuffer and have THUD execute it using (Scheme world procedure) execute-user-script.
a
Read a file name in the minibuffer and have THUD add that file to the workspace.
l
Perform a link (Scheme world procedure prepare-to-simulate).
n
Simulate. Numeric prefix arg specifies how many cycles to simulate, defaults to one.
RET
Same as n.
R
Reset. Emacs gets confirmation first.
q
Quit.
C-d
Same as q.
p
Read a string in the minibuffer and have THUD run (Scheme world procedure) eval-print on it.
d
Read a string in the minibuffer and have THUD run (Scheme world procedure) deposit on it.
i
Identical to typing the sequence : i.
h
Identical to typing the sequence : h.
m
Toggle displaying of scheduled values at the end of each cycle. This calls Elisp command inf-thud-send-string.
c
Read (possibly non-existent) file name in the minibuffer and have THUD "compile" the workspace to that output file.
s e
Identical to typing the sequence : s e. This is useful for "set" terse commands.
s h
Identical to typing the sequence : s h. This is useful for "show" terse commands.
s c
Do a completing-read for a new scope value and set it to that.