Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!HPLABS.HP.COM!hpsemc!bd From: hpsemc!bd@HPLABS.HP.COM (bob desinger) Newsgroups: comp.mail.mh Subject: Re: MH drawbacks for computer-unexperienced users Message-ID: <8805100637.AA09183@hpsemc.HP.COM> Date: 10 May 88 06:37:06 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 75 >> * There is no way to include a file in a letter without the use of >> an editor. > A simple solution to this is to write a custom "whatnow" and add a new > command ... Yes, or you could use this enclosed shar. Yes, you have to run an "editor," but it's not like you get bopped into an interactive session; it's more an editor in the style of `sed.' To use it: 1. Unpack it into some directory in everyone's $PATH. 2. At the What Now prompt, type: e attach file where "file" is the name of the file you want to include. The `attach' command name could be changed easily (via `mv') to `include' or whatever you prefer. 3. Now you'll see another What Now prompt. Type `p' or whatever you normally type to send the letter off. If you want to edit the file with your usual screen editor at this point, type: e vi or e emacs or else put an entry in your .mh_profile to the effect of: attach-next: vi No, it's not intuitive. However, it gets the job done quickly. -- bd #! /bin/sh # This is a shell archive. Remove anything before this line, # then unwrap it by saving it in a file and typing "sh file". # # Wrapped by bd at hpsemc on Mon May 9 23:33:58 1988 # Contents: # attach PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH; export PATH echo 'At the end, you should see the message "End of shell archive."' echo Extracting attach cat >attach <<'@//E*O*F attach//' : append editor for mh -- /jlr and bd case $# in 1) msg=$1; echo -n 'Append file(s): ' 1>&2; read appendix;; 2) msg=$2; appendix=$1;; *) echo 1>&2 "Usage: `basename $0` [file]"; exit 1;; esac for arg in $appendix do if [ -f $arg -a -r $arg ] # exists; non-directory; readable then echo 1>&2 \"$arg\" # yell the file name out cat >$msg else echo 1>&2 "`basename $0` $arg: Sorry." fi done @//E*O*F attach// set `wc -lwc