e93 Manual

Previous

Table of Contents

Next


Scripting

Scripting

e93 utilizes the Tcl scripting language. This allows it great flexibility. Users of e93 are able to write scripts to perform complex editing tasks, as well as use them to configure the editor to personal taste.

When e93 starts, it attempts to locate a file with the name e93rc.tcl (some implementations use slightly different names). This file is meant to contain a Tcl script. The script is charged with the task of setting up all menus, key bindings, and defaults that will be available when the editor starts. It is also the responsibility of this script to interpret all of the command line parameters passed to e93. That includes opening any files present on the command line. Without this script, e93 would not do very much. Therefore, if the script cannot be located at startup, e93 will complain, and quit.

This script is the primary means by which e93 is customized to the taste of the user. Given the number of things defined by this script, a fair amount of customization is available, but at the cost of some complexity. See Tcl startup script for information on how to customize e93 at startup time.

Once e93 has started, Tcl commands may be executed by typing them into any window, and pressing the enter key on the numeric keypad. The results of the command (if they are not piped elsewhere) are then placed into the window.

If you are viewing this file from within e93, do the following: Place the cursor anywhere on the following line, and press keypad enter:

beep; okdialog {Hmmm, that was interesting}

You should hear a beep, and then a dialog should pop up with a useless message in it. This works, because the e93rc.tcl script has bound the keypad enter key to a function that grabs the line the cursor is on (or the currently selected text), and sends it to Tcl for processing.


Previous

Table of Contents

Next

Last Changed January 2002