From: CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 6-OCT-1989 19:05 To: MRGATE::"ARISIA::EVERHART" Subj: MAIL tools ( for EVE) Message-Id: <8910062246.AA12243@crdgw1.ge.com> Received: From VTCC1.CC.VT.EDU by CRVAX.SRI.COM with TCP; Fri, 6 OCT 89 15:14:15 PDT Date: 6 Oct 89 17:54:00 EDT From: "VTPWR1::PHANIRAJ" Subject: MAIL tools ( for EVE) To: "info-vax" Hi One of the things that I found annoying about using the MAIL$EDIT logical to point to a file such as the one posted last week for signature files and appending ">" to every record in the input file instead of SET EDIT TPU was that it starts up a subprocess every time I use SEND or REPLY to use the editor. Since I use a COM file to start MAIL anyway ( defines all the names as logicals using define/user so that they don't clutter up my environment ouside MAIL) ; I used the same COM file to redefine TPU$COMMAND and EVE$INIT for the duration of the MAIL session so that they do the above functions instead without spawning a subprocess. For me : MAI*L == "@DK:[PHANIRAJ.MAIL.TOOLS]MAIL_NAMES" where MAIL_NAMES.COM contains $ delete/symbol/nolog/global mail $ define/nolog/user sys$input sys$command $ define/nolog/user infovax vtcc1::wins%"""info-vax@sri.com""" . .( more logical names) . $ define/nolog eve$init dk:[phaniraj.mail.tools]init.tpu $ define/nolog tpu$command dk:[phaniraj.mail.tools]com.tpu $ mail/edit=(send,reply=extract,forward) $ mai*l :== @dk:[phaniraj.mail.tools]mail_names $ define/nolog tpu$command lib:com.tpu $ deass eve$init I don't use EVE$INIT normally ; hence it is deassigned at the end of the procedure. TPU$COMMAND is redefined to what it is for normal editing purposes. The command file is executed first by EVE, so that contains the "prefix >" routine as shown. COM.TPU contains procedure mail_start prefix := "> "; position(beginning_of(current_buffer)); loop; exitif (mark(none) = end_of(current_buffer)); copy_text(prefix); move_horizontal(-length(prefix)); move_vertical(1); endloop; endprocedure; mail_start and finally the INIT file INIT.TPU set left margin 2 set right margin 78 set cursor bound include file dk:[phaniraj.mail.tools]mail.sig And of course, SET EDIT TPU while in MAIL once. I believe this procedure will not work for VMS 4.x since SET EDIT TPU is not an option there. This setup saves me the process creation overhead ; it could be improved by putting the bulk of the COM.TPU into the default section file if you have one of your own. Allows customizing the MAIL edit environment as opposed to the normal editing, e.g SET LEFT MARGIN 2, SET RIGHT MARGIN 78 make sure that the mail is within normal limits for most mailers. ( The TPU code in COM.TPU was taken from the files posted by Nick de Smith last week to INFO-VAX). Raj Viruru PHANIRAJ%VTPWR1.DECNET@VTCC1.CC.VT.EDU VAX System Manager, Power Systems Lab Email : PHANIRAJ@VTVM1.CC.VT.EDU Bradley Department of Electrical Engineering Bitnet: PHANIRAJ@VTVM1 419 Whittemore Hall, Virginia Tech Local DECnet : VTPWR1::PHANIRAJ Blacksburg VA 24061 Phone : (703)-231-7834,7397