home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / mail / elm / 3431 < prev    next >
Encoding:
Text File  |  1992-11-21  |  2.5 KB  |  61 lines

  1. Newsgroups: comp.mail.elm
  2. 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
  3. From: chip@chinacat.unicom.com (Chip Rosenthal)
  4. Subject: New printing feature with Elm2.4pl8 [Was: ELM print utility]
  5. Organization: Unicom Systems Development, Austin, TX
  6. Date: Sun, 22 Nov 1992 04:54:40 GMT
  7. Message-ID: <1992Nov22.045440.13375@chinacat.unicom.com>
  8. References: <1992Nov19.181532.29186@netcon.smc.edu>
  9. Lines: 50
  10.  
  11. In article <1992Nov19.181532.29186@netcon.smc.edu>
  12.     lawrence@netcon.smc.edu (Lawrence Roney) writes:
  13. >I recall seeing a utility that rerouted ELM's print command to the user's
  14. >local terminal and not the system printer.  Could someone tell me what this
  15. >utility is called and where I might FTP it?
  16.  
  17. Unless you read the Elm patch files very carefully, you might have
  18. missed it.  Patches 7/8 introduced some enhancements to Elm printing,
  19. and you might find those changes helpful.
  20.  
  21. In a nutshell, Elm used to insist that your printing command contain
  22. a "%s" somewhere in it, e.g. "cat %s | lp".  It would dump your mail
  23. message into a temporary file, replace the "%s" in your command string
  24. with the name of the temporary file, and run the command.
  25.  
  26. Starting at PL8, if you omit the "%s" from the command string a new
  27. behavior is triggered.  In that mode, Elm will dump the mail message
  28. right into the printing command rather than screwing around with
  29. temporary files.  This means, for example, your print command can now
  30. be simply "lp".
  31.  
  32. Further, in this new mode the output of the print command is left
  33. attached to your terminal.  The old mode for some silly reason threw
  34. everything away.  This new mode means that you might be able to do
  35. local printing with something as simple as:
  36.  
  37.     :
  38.     # lplocal - pass-thru printing
  39.     case "$TERM" in
  40.     ansi*)    onstr="\033[5i" offstr="\033[4i" ;;
  41.     vt*)    onstr="\033[5i" offstr="\033[4i" ;;
  42.     wy*)    onstr="\033d#" offstr="\024" ;;
  43.     *)    echo "$0: I do not understand your TERM type" 1>&2 ; exit 1 ;;
  44.     esac
  45.     /bin/echo "${onstr}\c"
  46.     cat $@
  47.     /bin/echo "${offstr}\c"
  48.  
  49. (Warning - the above is an extemporaneous, untested composition.)
  50.  
  51. If you have a "%s" in your print command, you get the old behaviour.
  52. However, I'd strongly advise you to drop the "%s" and try out the new
  53. feature.  It's more efficient, it let's you see what is going on, and
  54. it allows stuff like pass-thru printing feasible without extensive
  55. contortions.
  56.  
  57. -- 
  58. Chip Rosenthal  512-482-8260 | I got the blues so bad one time
  59. Unicom Systems Development   | it put my face in a permanent frown.
  60. <chip@chinacat.Unicom.COM>   |   - Taj Mahal
  61.