Solved

Printing from Emacs to Local Printer

Posted on 1997-09-19
5
269 Views
Last Modified: 2010-03-18
Hi, I'm running Redhat 4.2 and I would like to be able to print to my local printer from emacs in X windows. I want to print a man page for example. I have set my printer up with the name lp1 and can print from ghostview quite nicely. How do I set my printer up for emacs? Note: With my unix expierience I always thought there was a .emacs file but I can't seem to find it.

thanks
zeos
0
Comment
Question by:zeos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:unicorntech
ID: 1586604
What commands are you using to print now.  You should be able to print a man page by typing:
 man <subject> | lpr -Plp1

Let me know how it goes,

Jason
0
 
LVL 4

Accepted Solution

by:
unicorntech earned 50 total points
ID: 1586605
What commands are you using to print now.  You should be able to print a man page by typing:
 man <subject> | lpr -Plp1

Let me know how it goes,

Jason
0
 

Author Comment

by:zeos
ID: 1586606
Jason, thanks for the quick reply. Your suggestion worked, thanks. But if I'm in X windows and I want to be able to print the current buffer do you know of a way that I can have emacs default to lp1?

thanks
mike
0
 
LVL 4

Expert Comment

by:unicorntech
ID: 1586607
If you use something such as the following in .emacs this should do the job;

(setq printer t)  ; Anything but a string.
     (setq ps-lpr-command "whatever")
     (setq ps-lpr-switches '("-q" "-dNOPAUSE"
                        "-sDEVICE=printer type"
                        "-r240x72"
                        "-sOutputFile=LPT2"
                        "-"))

Try the Emacs help on-line at http://monarch.mcs.csuhayward.edu/doc/emacs/

Hope this does the trick.

Let me know if you need more help....

Jason
0
 

Author Comment

by:zeos
ID: 1586608
Jason, Thanks for your help. It worked!

Thanks again
Mike
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question