Jinfu@cup.portal.com (05/03/88)
I need some help in using the DM pad editor (ce) with /usr/ucb/Mail. What I am trying to do is to use an alternative editor for the Mail program instead of the UN*X ones (ed or vi), since most our users are AEGIS minded (including myself :-). I redefine the EDITOR in the Mail program with the DM pad editor by this command in my .mailrc file: set EDITOR=/user/chen/com/dmeditor 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. Jinfu Chen Motorola, Inc. Jinfu@cup.portal.com ...sun!portal!cup.portal.com
dennis@cod.NOSC.MIL (Dennis Cottel) (05/05/88)
In article <5060@cup.portal.com> Jinfu@cup.portal.com writes: > I need some help in using the DM pad editor (ce) with /usr/ucb/Mail. We have written a small C program DMED which does the trick. Then configure all users' .mailrc file with set VISUAL=/user/local/com/dmed Another problem with Mail is that it insists on using /usr/ucb/more to display long messages. I have patched the program to instead look for the relative filename "more.pager" so that each person can use his/her own favorite paging program. I have a link in my personal ~/com directory from "more.pager" to "/com/crpad". Note that using DM-oriented programs are a problem if you login remotely to read your mail. Dennis Cottel Naval Ocean Systems Center, San Diego, CA 92152 (619) 553-1645 dennis@NOSC.MIL sdcsvax!noscvax!dennis
nazgul@apollo.uucp (Kee Hinckley) (05/07/88)
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.