Small Tcl/Tk hacks

crypt - an example for extending Tcl
tkselcol - select a color and echo to stdout
Actually quite primitive. Done with XF.

tkselcol GUI

tcl2c - make C string from Tcl script
Bourne Shell script, writes C source to stdout. String can then be evaluated with Tcl_Eval(); useful to make a self-contained binary which carries Tcl/Tk startup files and your script in itself. Actually someone else's work; slightly modified by me. Needs ANSI C.

send-emacs - send editing command to Emacs
Place emacs-listener in your $PATH, load listener.el into Emacs, and invoke M-x listener-start. Now you can call "send-emacs file" from your shell to make Emacs edit file.

By using Tk's send command, send-emacs and emacs-listener communicate via X properties and thus work (a) via the network and (b) utilize the security mechanism of your X display, e.g. xauth(1). To be precise, send-emacs will not work with host-based access control.

Jürgen Nickelsen, 1999-09-04