Solved

Printing from Emacs to Local Printer

Posted on 1997-09-19
5
259 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 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now