Article View: gnu.emacs.bug
Article #87300print-buffer uses wrong page length (with generic patch)
From: Joe Hildebrand
Date: Thu, 29 Sep 1994 19:16
Date: Thu, 29 Sep 1994 19:16
63 lines
3173 bytes
3173 bytes
In GNU Emacs 19.27.1 (hppa1.1-hp-hpux9, X toolkit) of Fri Sep 16 1994 on idaho
Since the "pr" program for my box doesn't produce pages of the correct
length when I user print-buffer, I wrote this extension to lpr.el. It
can probably be used to call you favorite pretty-printer,
postscript-izer, etc, just prior to printing. If none of the new
variables are changed, lpr.el maintains its current functionality.
Here is the diff for lpr.el:
*** lpr.el Thu Sep 29 15:05:21 1994
--- /usr/local/lib/emacs/19.27/lisp/lpr.el Tue Aug 23 18:43:27 1994
***************
*** 50,65 ****
"Function to call to print the region on a printer.
See definition of `print-region-1' for calling conventions.")
- (defvar lpr-pretty-print-command "pr"
- "Command to call to add headers/footers, etc.")
-
- (defvar lpr-pretty-print-switches '("-h")
- "Switches for command to add headers/footers, etc.
- Be sure to include -h if 'lpr-pretty-print-add-options' is t.")
-
- (defvar lpr-pretty-print-add-options t
- "Add string for page title to end of pretty-print command line.")
-
;;;###autoload
(defun lpr-buffer ()
"Print buffer contents as with Unix command `lpr'.
--- 50,55 ----
***************
*** 113,124 ****
lpr-headers-switches)
switches))
(print-region-new-buffer start end)
! (apply 'call-process-region
! (nconc (list start end lpr-pretty-print-command t t nil)
! (or lpr-add-options
! (nconc lpr-pretty-print-switches
! (and lpr-pretty-print-add-options
! (list title))))))
(setq start (point-min) end (point-max))))
(apply (or print-region-function 'call-process-region)
(nconc (list start end lpr-command
--- 103,109 ----
lpr-headers-switches)
switches))
(print-region-new-buffer start end)
! (call-process-region start end "pr" t t nil)
(setq start (point-min) end (point-max))))
(apply (or print-region-function 'call-process-region)
(nconc (list start end lpr-command
--
Joe Hildebrand Fuentez Systems Concepts
hildjj@fuentez.com 11781 Lee-Jackson Hwy, Suite 700
Software Engineer Fairfax, VA 22033
Phone: (703)273-1447
Fax: (703)273-2972
PGPprint: 0x06C96661
Standard disclaimers apply
Technical Details
Message-ID:
<9409291912.AA07081@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!idaho.fuentez.com!hildjjShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,8bbdd49bd2fd313a,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-29 13:15:54 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!idaho.fuentez.com!hildjj From: hildjj@idaho.fuentez.com (Joe Hildebrand) Newsgroups: gnu.emacs.bug Subject: print-buffer uses wrong page length (with generic patch) Date: 29 Sep 1994 15:16:47 -0400 Organization: GNUs Not Usenet Lines: 65 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409291912.AA07081@life.ai.mit.edu> Reply-To: hildjj@fuentez.com