help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adjusting page length in "Print buffer" command


From: Tim McNamara
Subject: Re: Adjusting page length in "Print buffer" command
Date: Sat, 15 Jan 2005 09:57:29 -0600
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (darwin)

"Eli Zaretskii" <eliz@gnu.org> writes:

>> From: Tim McNamara <timmcn@bitstream.net> Date: Fri, 14 Jan 2005
>> 13:57:33 -0600
>> 
>> Thanks.  However, I am using the "Print Buffer" command under the
>> File menu, not the "Postscript Print Buffer" command.  Does that
>> make a difference?
>
> Yes.
>
> Please see if any of the options mentioned in the doc string of
> print-buffer help you get what you want:
>
>     print-buffer is an interactive autoloaded Lisp function in
>     `lpr'.  It is bound to <menu-bar> <file> <print-buffer>.
>     (print-buffer)
>
>     Paginate and print buffer contents.
>
>     The variable `lpr-headers-switches' controls how to paginate.
>     If it is nil (the default), we run the `pr' program (or whatever
>     program `lpr-page-header-program' specifies) to paginate.
>     `lpr-page-header-switches' specifies the switches for that
>     program.
>
>     Otherwise, the switches in `lpr-headers-switches' are used in
>     the print command itself; we expect them to request pagination.
>
>     See the variables `lpr-switches' and `lpr-command' for further
>     customization of the printer command.

I couldn't find this in Info, obviously looking in the wrong places.
Where is it?

> I'd say, study the man pages on your system for the commands `pr'
> and `lpr' and decide what you should put into `lpr-headers-switches'
> and/or `lpr-switches' for the letter-size paper.

Ah.  I had assumed pagination was being done by default within Emacs
and not elsewhere in the filesystem.  Thanks for that tip!

> (This advice might not work for Windows, but you didn't say that you
> were using Windows.)

Mac OS X 10.3.7, so it is a Unix-like setup.  pr, lpr and such are
present.

"man pr" specifies that pages are 66 lines long with a 5 line header
and 5 line footer included.  the -l flag can be used to override this:

" -l lines Override the 66 line default and reset the page length to
           lines. If lines is not greater than the sum of both the
           header and trailer depths (in lines), the pr utility
           suppresses output of both the header and trailer, as if the
           -t option were in effect."

" -t Print neither the five-line identifying header nor the five-line
           trailer usually supplied for each page.  Quit printing
           after the last line of each file without spacing to the end
           of the page."

So, I should be able to modify "lpr-headers-switches" to request a
different pagination, from what your post suggests- in effect, to call
"pr -l _lines_" when "print-buffer" is called?  Counting lines on the
printed pages, it looks like I need to modify the pagination to a
total of 50 or 51 lines.  Can I modify "lpr-headers-switches" to do
this?  Is this done directly by modifying the command or is this done
in my .emacs?  Is there a way to do this simply via "Customize Emacs"
that I have overlooked?

Thanks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]