--- auctex/tex.el.orig 2013-01-24 12:50:59.184353563 +0400 +++ auctex/tex.el 2013-01-24 12:54:47.633486387 +0400 @@ -350,13 +350,12 @@ ;; you only have one printer. (defcustom TeX-printer-list - '(("Default" - ;; Print to the (unnamed) default printer. If there is a DVI - ;; file print via Dvips. If not, pass the output file (which - ;; should then be a Postscript or PDF file) directly to lpr. - "{ test -e %s.dvi && %(o?)dvips -f %r %s | lpr; } || lpr %o" - ;; Show the queue for the (unnamed) default printer. - "lpq")) + ;; traditional ALT Linux patch + ;; Get first printer name from the list returned by lpstat + (car (read-from-string + (shell-command-to-string "[ -x /usr/bin/lpstat ] && { echo '('; for p in $(lpstat -p 2>/dev/null | cut -d' ' --fields=2); do echo -n \"(\\\"$p\\\")\"; done; echo ')'; } || echo nil") + ) + ) "List of available printers. The first element of each entry is the printer name.