All Manuals > LispWorks IDE User Guide > 20 The Listener

20.10 Execute mode

The Listener is actually a special type of editor window, which is run in a mode known as execute mode. This means that, as well as the normal keyboard commands available to the editor, a number of additional commands are available which are especially useful when working interactively.

20.10.1 History commands

These commands are useful in the common situation where you need to repeat a previously entered command, or enter a variant of it.

Emacs Key Sequence: Ctrl+C <

Replaces the current command by the first command.

Emacs Key Sequence: Ctrl+C Ctrl+K

Kills the current command when in a listener.

Emacs Key Sequence: Ctrl+C >

Replaces the current command by the last command.

Emacs Key Sequence: Esc N or Ctrl+C Ctrl+N

Displays the next event on the history list. That is, it replaces the current command by the next one. This is not available if you are at the end of the history list.

Emacs Key Sequence: Esc P or Ctrl+C Ctrl+P

Displays the previous event on the history list: that is, it replaces the current command by the previous one.

Emacs Key Sequence: Esc R or Ctrl+C Ctrl+R

Searches for a previous command containing a given string, which it prompts for, and replaces the current command with it.

Emacs Key Sequence: None

Searches the history list using current input. That is, it searches for a previous command containing the string entered so far, and replaces the current command with it.

Repeated uses step back to previous matches.

Emacs Key Sequence: Ctrl+C Ctrl+F

Presents a list of items in the command history, and replaces the current command with the selection.

Emacs Key Sequence: Ctrl+C Ctrl+Y

Inserts the previous command into the current one, when in a listener.

20.10.2 Debugger commands

These commands are useful when in the debugger in the Listener:

Emacs Key Sequence: Esc Shift+B

Gets a backtrace when in the debugger.

Emacs Key Sequence: Esc Shift+A

Aborts in the debugger.

Emacs Key Sequence: Esc Shift+C

Continues in the debugger.

Emacs Key Sequence: Esc Shift+P

Displays the previous frame in the debugger.

Emacs Key Sequence: Esc Shift+N

Displays the next frame in the debugger.

Emacs Key Sequence: Esc Shift+E

Edits the current frame in the debugger.

Emacs Key Sequence: Esc Shift+V

Prints the variables of the current frame in the debugger.

20.10.3 Miscellaneous Listener commands

Here are more commands, with their Execute mode key bindings, which are useful in the Listener.

Emacs Key Sequence: Ctrl+C Ctrl+I

Inspects the current value (that is, the value of the Common Lisp variable *).

Emacs Key Sequence: None

Inspects the value of an editor variable, which is prompted for.

Emacs Key Sequence: Esc K

Abandons the current input.

For more details about other keyboard commands available in the editor, see 12 The Editor, and the Editor User Guide.

20.10.4 Highlighting of results

The results of expression evaluation in the Listener are output as marked objects (except for trivial objects). That means they have a special style, and you can operate on them by using the context menu and choosing items from the Marked Object submenu, with items like the Values menu.

Note that, for the latest results, you also can also use Values menu in the menu bar. However, the Values menu is applicable only to the latest results, and if there is more than one result (the form that was evaluated returned multiple values), then it is applied to the list of the latest results. The Marked Object submenu of the context menu is applicable to all the results in the Listener, and to each result individually.

The style used to display marked objects is called Marked Object and can be changed via Preferences... > Environment > Styles > Styles Colors And Attributes. By default, marked objects are underlined.

The function prin1-marked-object can be used to print objects as marked objects in the Listener or Background Output streams.

prin1-marked-object Function

lw-tools:prin1-marked-object object &optional output-stream => object

The function prin1-marked-object prints any Lisp object object to the stream designator output-stream similarly to prin1, but when output-stream is a Listener or Background Output stream, it outputs object as a marked object. output-stream defaults to the value of *standard-output*.

prin1-marked-object limits the length of the output to 1000000 (million) characters.


LispWorks IDE User Guide (Macintosh version) - 01 Dec 2021 19:36:33