wine@retina.cs.ucla.edu (10/06/89)
What's the best way to use enscript instead of lpr? Simply setting lpr-command isn't good enough because emacs sends along some switches (in print-buffer and print-region) that enscript doesn't interpret as lpr does. --David Wine University of California at Los Angeles wine@cs.ucla.edu Computer Science Department (213) 825-6121 3531 Boelter Hall ...!(uunet,rutgers,ucbvax,randvax)!cs.ucla.edu!wine Los Angeles, CA 90024
hallett@pet3.uucp (Jeff Hallett x5163 ) (10/06/89)
In article <27809@shemp.CS.UCLA.EDU> wine@retina.cs.ucla.edu (David Wine) writes: >What's the best way to use enscript instead of lpr? >Simply setting lpr-command isn't good enough because >emacs sends along some switches (in print-buffer and >print-region) that enscript doesn't interpret as lpr >does. Simple. You rewrite print-region (since print-buffer just calls print-region) to use enscript rather than lpr. It will look basically like this (with miscellaneous stuff omitted): (defun print-region (start end switches) (let ((width tab-width)) (save-excursion (message "Spooling...") (apply 'call-process-region (nconc (list start end "enscript" nil nil nil (concat "-J\"" (buffer-name) "\"") switches)) (message "Spooling...done")))) -- Jeffrey A. Hallett, PET Software Engineering GE Medical Systems, W641, PO Box 414, Milwaukee, WI 53201 (414) 548-5163 : EMAIL - hallett@gemed.ge.com "Your logic was impeccable Captain. We are in grave danger."