Path: utzoo!mnetor!uunet!husc6!mit-eddie!apollo!nazgul From: nazgul@apollo.uucp (Kee Hinckley) Newsgroups: comp.sys.apollo Subject: Re: A pretty good sendmail.cf Message-ID: <3be5a914.b0a1@apollo.uucp> Date: 6 May 88 23:05:00 GMT References: <5016@bcsaic.UUCP> <5060@cup.portal.com> Reply-To: nazgul@morgul.UUCP (Kee Hinckley) Organization: Apollo Computer, Chelmsford, MA Lines: 39 In article <5060@cup.portal.com> Jinfu@cup.portal.com writes: > where the file dmeditor is a simple /com/sh script as following: > > #! /com/sh > # dmeditor, DM pad editor > eon > xdmc ce ^1 > # EOF > > I was able to enter ~e in the Mail program to bring up a pad and to edit > it. However, after I saved the file (control-Y), the Mail program didn't > get the contents of the file. Closer examination shows that the temporary > file created by the native ~e (ed) or ~v (vi) has the first character of > the filename in uppercase. For example, /tmp/R00150, or /tmp/Ex00321, while > the file created by the DM pad editor is in lower case (standard pre-SR10 > Aegis filename?) like /tmp/r00150. I'm not sure if this is the problem. > > I would appreciate any help, expecially from UNIX gurus. Our site is > running Domain/IX 9.5, Aegis 9.6. I think there are two problems here. The first is the case sensitivity problem. For that simply change your script to say: xdmc "ce '^1'" The more basic problem is that you really want your program to wait until the edit is finished, and then return success or failure depending on whether the user saved the pad, or canceled the editor - otherwise Mail will continue directly as soon as (or even before) the edit pad has appeared. The easiest way to do this is write a simply little program that calls pad_$create_window and then pad_$edit_wait. We have a bunch of varieties of such running around in-house - some which create separate windows, some which create a pane. We probably ought to combine them into a command and ship it. -nazgul -- ### {mit-erl,yale,uw-beaver}!apollo!nazgul ### (Apple ][e ProLine BBS) ### ### apollo!nazgul@eddie.mit.edu ### nazgul@pro-angmar.uucp ### ### nazgul@apollo.uucp ### (617) 641-3722 300/1200/2400 ### I'm not sure which upsets me more; that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.