Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!rjeinc!crts From: crts@rjeinc Newsgroups: gnu.emacs.bug Subject: bug in lpr.el Message-ID: <8809210353.AA01846@apple.apple.com> Date: 21 Sep 88 03:53:38 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 GNU Emacs 18.51.22 of Mon Sep 19 1988 on rjeinc (usg-unix-v) There's a bug in lpr.el which makes lpr-buffer inoperative on this SysV. The code for lpr.el correctly accounts for UnixV versus BSD by the code segment: (apply 'call-process-region (nconc (list start end (if (eq system-type 'usg-unix-v) "lp" "lpr") nil nil nil "-J" name "-T" name) switches)) which tells emacs to expect to run the "lp" program rather than "lpr", but the switches that are passed to lp (-J and -T) are unknown to lp. The lp program responds by: '/usr/bin/lp: unknown keyletter "-j"' (a message which we actually don't see since the BUFFER arg to call-process-region is nil). Result: call-process-region returns, no output on printer. This can be fixed by replacing the above with: (apply 'call-process-region (nconc (if (eq system-type 'usg-unix-v) (list start end "lp" nil nil nil (concat "-t" "\"" name "\"")) (list start end "lpr" nil nil nil "-J" name "-T" name)) switches)) ---Kayvan