5.2 Using the Shell

The IDLWAVE shell works in the same fashion as other shell modes in Emacs. It provides command history, command line editing and job control. The UP and DOWN arrows cycle through the input history just like in an X terminal3. The history is preserved between emacs and IDL sessions. Here is a list of commonly used commands:

UP, M-pCycle backwards in input history
DOWN, M-nCycle forwards in input history
M-rPrevious input matching a regexp
M-sNext input matching a regexp
returnSend input or copy line to current prompt
C-c C-aBeginning of line; skip prompt
C-c C-uKill input to beginning of line
C-c C-wKill word before cursor
C-c C-cSend ^C
C-c C-zSend ^Z
C-c C-\Send ^\
C-c C-oDelete last batch of process output
C-c C-rShow last batch of process output
C-c C-lList input history

In addition to these standard comint commands, idlwave-shell-mode provides many of the same commands which simplify writing IDL code available in IDLWAVE buffers. This includes abbreviations, online help, and completion. See Routine Info and Online Help and Completion for more information on these commands.

TABCompletion of file names (between quotes and after executive commands ‘.run’ and ‘.compile’), routine names, class names, keywords, system variables, system variable tags etc. (idlwave-shell-complete).
M-TABSame as TAB
C-c ?Routine Info display (idlwave-routine-info)
M-?IDL online help on routine (idlwave-routine-info-from-idlhelp)
C-c C-iUpdate routine info from buffers and shell (idlwave-update-routine-info)
C-c C-vFind the source file of a routine (idlwave-find-module)
C-c C-tFind the source file of a routine in the currently visited file (idlwave-find-module-this-file).
C-c =Compile a library routine (idlwave-resolve)
User Option: idlwave-shell-arrows-do-history (t)

Non-nil means UP and DOWN arrows move through command history like xterm.

User Option: idlwave-shell-comint-settings

Alist of special settings for the comint variables in the IDLWAVE Shell.

User Option: idlwave-shell-file-name-chars

The characters allowed in file names, as a string. Used for file name completion.

User Option: idlwave-shell-graphics-window-size

Size of IDL graphics windows popped up by special IDLWAVE command.

IDLWAVE works in line input mode: You compose a full command line, using all the power Emacs gives you to do this. When you press RET, the whole line is sent to IDL. Sometimes it is necessary to send single characters (without a newline), for example when an IDL program is waiting for single character input with the GET_KBRD function. You can send a single character to IDL with the command C-c C-x (idlwave-shell-send-char). When you press C-c C-y (idlwave-shell-char-mode-loop), IDLWAVE runs a blocking loop which accepts characters and immediately sends them to IDL. The loop can be exited with C-g. It terminates also automatically when the current IDL command is finished. Check the documentation of the two variables described below for a way to make IDL programs trigger automatic switches of the input mode.

User Option: idlwave-shell-use-input-mode-magic (nil)

Non-nil means IDLWAVE should check for input mode spells in output.

User Option: idlwave-shell-input-mode-spells

The three regular expressions which match the magic spells for input modes.


Footnotes

(3)

This is different from normal Emacs/Comint behavior, but more like an xterm. If you prefer the default comint functionality, check the variable idlwave-shell-arrows-do-history.