home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.mail.elm
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!m2.dseg.ti.com!ernest!chinacat!chip
- From: chip@chinacat.unicom.com (Chip Rosenthal)
- Subject: New printing feature with Elm2.4pl8 [Was: ELM print utility]
- Organization: Unicom Systems Development, Austin, TX
- Date: Sun, 22 Nov 1992 04:54:40 GMT
- Message-ID: <1992Nov22.045440.13375@chinacat.unicom.com>
- References: <1992Nov19.181532.29186@netcon.smc.edu>
- Lines: 50
-
- In article <1992Nov19.181532.29186@netcon.smc.edu>
- lawrence@netcon.smc.edu (Lawrence Roney) writes:
- >I recall seeing a utility that rerouted ELM's print command to the user's
- >local terminal and not the system printer. Could someone tell me what this
- >utility is called and where I might FTP it?
-
- Unless you read the Elm patch files very carefully, you might have
- missed it. Patches 7/8 introduced some enhancements to Elm printing,
- and you might find those changes helpful.
-
- In a nutshell, Elm used to insist that your printing command contain
- a "%s" somewhere in it, e.g. "cat %s | lp". It would dump your mail
- message into a temporary file, replace the "%s" in your command string
- with the name of the temporary file, and run the command.
-
- Starting at PL8, if you omit the "%s" from the command string a new
- behavior is triggered. In that mode, Elm will dump the mail message
- right into the printing command rather than screwing around with
- temporary files. This means, for example, your print command can now
- be simply "lp".
-
- Further, in this new mode the output of the print command is left
- attached to your terminal. The old mode for some silly reason threw
- everything away. This new mode means that you might be able to do
- local printing with something as simple as:
-
- :
- # lplocal - pass-thru printing
- case "$TERM" in
- ansi*) onstr="\033[5i" offstr="\033[4i" ;;
- vt*) onstr="\033[5i" offstr="\033[4i" ;;
- wy*) onstr="\033d#" offstr="\024" ;;
- *) echo "$0: I do not understand your TERM type" 1>&2 ; exit 1 ;;
- esac
- /bin/echo "${onstr}\c"
- cat $@
- /bin/echo "${offstr}\c"
-
- (Warning - the above is an extemporaneous, untested composition.)
-
- If you have a "%s" in your print command, you get the old behaviour.
- However, I'd strongly advise you to drop the "%s" and try out the new
- feature. It's more efficient, it let's you see what is going on, and
- it allows stuff like pass-thru printing feasible without extensive
- contortions.
-
- --
- Chip Rosenthal 512-482-8260 | I got the blues so bad one time
- Unicom Systems Development | it put my face in a permanent frown.
- <chip@chinacat.Unicom.COM> | - Taj Mahal
-