Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to both emacs and also do not have much experience with bash. I have a few questions which are related?

(1) Can I set up emacs such that I can choose the printer that I print to? I have access to one printer connected by USB and two network printers and I do not always want to print to the same printer.

(2) How do I find out the exact names of these printers (required for setup with emacs)? Are these the same as the names that show up in System Preferences -> Print & Fax on Mac OSX

(3) Is there a command or something to find the names of printers (connected by USB and network printers) that one has access to?

Thanks to all the experts here, who are always so helpful.

share|improve this question

migrated from Dec 15 '10 at 3:35

This question came from our site for professional and enthusiast programmers.

I appreciate why many are voting to close this question. Can I appeal on behalf of the author? Programming tools are essential to our day-to-day lives as developers. Here we have a programmer looking for help with a tool... suggest alternate sites by all means, but since isn't an option when you hit the "close" link and select "off topic", and superusers is a silly suggestion for an emacs question, I'd really love an answer here. I myself always search SO first when I have an emacs question. – Jarret Hardie Dec 15 '10 at 3:34

Running lpq in a terminal should show you what printers are available on the system.

share|improve this answer
Thanks for the answer. However, lpq does not work. When I type it, it just returns AdobePDF9. However my computer is connected to another printer via USB at this moment. In addition, I can print on two network printers from here. – user37473 Dec 15 '10 at 12:30
Huh. They can buy CUPS but they can't get it right... – Ignacio Vazquez-Abrams Dec 15 '10 at 14:32
Sorry, but I don't know what that means. – user37473 Dec 15 '10 at 15:54
Apple purchased CUPS (the printing subsystem used in OS X and various other *nices) from its original developers a while ago, so you'd think that they'd be able to get it to show all the printers the system has configured. – Ignacio Vazquez-Abrams Dec 15 '10 at 16:00
Thanks Ignacio. Appreciate the explanation. – user37473 Dec 15 '10 at 18:57

I haven't used custom emacs variables like lpr-printer-switch or printer-name. And I'm not sure you can select a different printer than the default from inside emacs.

But you can

lpstat -p -d  # list known printers
lpoptions -d PRINTER  # change the default printer

So you need CUPS properly configured. I usually go to http://localhost:631/.
Not sure for OSX, but at least this works on Linux.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .