[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing from Emacs to Local Printer

Posted on 1997-09-19
5
Medium Priority
?
276 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
  • 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 100 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
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…
Suggested Courses

830 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