Re: Printing from emacs

Gilbert Harman <[email protected]> Thu, 04 Jul 2002 22:07:07 -0400
Newsgroups gmane.emacs.macintosh.user
Message-ID <B94A778B.57BE%[email protected]>
I earlier asked if anyone knew how I could use my LexMark Optra E312 printer
within emacs via "lpr-buffer" or "lpr-region".  I received advice about how
to configure this printer, none of which I could use.

Also, the printer is not an appletalk printer, so using atprint doesn't
work.

However, in the O'Reilly book, "Learning Unix for Mac OSX," I discovered the
command "Print" which can be used to send things to the Print Center.  Then
Immanuel Litzroth <[email protected]> explained how he had gotten an
appletalk printer to work by writing a shell script.

After trying a number of things, I came up with the following solution that
is clumsy but seems to work OK.

First, I defined the following 4 line shell script and called it "mypr".

#/bin/sh
/usr/bin/enscript -p ~/tmp/temp.ps $1
/usr/sbin/Print ~/tmp/temp.ps
/bin/rm ~/tmp/temp.ps

I put the script in my home directory and used "chmod" to make it
executable.  (chmod 755 mypr).

Then I added the following to my .emacs file:

(setq lpr-command "/Users/myhome/mypr")

This seems overly complex, but I can't find a simpler solution.

-- 

  Gil




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf