home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4122 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.8 KB  |  49 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!umn.edu!news
  3. From: goepping@msi-s23.msi.umn.edu (Jason Goeppinger [Math])
  4. Subject: Re: lpr-buffer
  5. In-Reply-To: alexeev@math.utah.edu's message of 12 Sep 92 16:47:01
  6. Message-ID: <GOEPPING.92Sep14150137@msi-s23.msi.umn.edu>
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: s23.msi.umn.edu
  9. Organization: MSI
  10. References: <ALEXEEV.92Sep12164701@solitude.math.utah.edu>
  11. Distribution: gnu
  12. Date: Mon, 14 Sep 1992 21:01:37 GMT
  13. Lines: 34
  14.  
  15. In article <ALEXEEV.92Sep12164701@solitude.math.utah.edu> alexeev@math.utah.edu (Valery A. Alexeev) writes:
  16.  
  17.    This might be a very simple question but I couldn't figure it myself
  18.    whatever I tried it was wrong.
  19.    I cannot print anything from within emacs using M-x lpr-buffer or M-x
  20.    lpr-region. Reason: when I normally print text files, I have to
  21.    convert them to Postscript first, so I type something like
  22.  
  23.    lptops -backwards | lpr -Pjwb120 file.txt
  24.  
  25.    So I tried to change lpr-command in lpr.el from "lpr" to
  26.    "lptops -backwards | lpr" and lpr-switches to "-Pjwb120", well it
  27.    does't know the program "lptops -backwards | lpr", so it won't work.
  28.  
  29.    Would some kind soul point me the solution ?
  30.  
  31. A hack I would use would be to write a script that you could save as an
  32. executable in your path (assuming you're using Un*x. . .) like
  33.  
  34. #!/bin/csh -f
  35.  
  36. lptops -backwards | lpr -Pjwb120 $argv
  37.  
  38.  
  39. And save it with a name like mylpr in a directory found in your 'path'
  40. shell variable.  (Dont forget to change the execute permission: chmod u+x
  41. mylpr).  Then you can use the command you've written whenever you need to
  42. print and you can use it as the lpr-command.  Perhaps someone has a better
  43. solution, but I think this one will do the trick.
  44.  
  45. --
  46.  
  47.     Jason Goeppinger
  48.     (goepping@s1.msi.umn.edu)
  49.