unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim McNamara <timmcn@bitstream.net>
Subject: Re: Adjusting page length in "Print buffer" command
Date: Sat, 15 Jan 2005 09:57:29 -0600	[thread overview]
Message-ID: <m2d5w68z2u.fsf@Althea.local> (raw)
In-Reply-To: mailman.13284.1105787022.27204.help-gnu-emacs@gnu.org

"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!

  parent reply	other threads:[~2005-01-15 15:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-14 14:23 Adjusting page length in "Print buffer" command Tim McNamara
2005-01-14 14:46 ` Sébastien Kirche
2005-01-14 18:45   ` Sébastien Kirche
2005-01-14 19:57     ` Tim McNamara
2005-01-15 10:35       ` Eli Zaretskii
     [not found]       ` <mailman.13284.1105787022.27204.help-gnu-emacs@gnu.org>
2005-01-15 15:57         ` Tim McNamara [this message]
2005-01-15 16:59           ` Eli Zaretskii
     [not found]           ` <mailman.13328.1105809630.27204.help-gnu-emacs@gnu.org>
2005-01-15 22:20             ` Tim McNamara
2005-01-16 19:45               ` Eli Zaretskii
     [not found]               ` <mailman.13534.1105905964.27204.help-gnu-emacs@gnu.org>
2005-01-16 20:47                 ` Tim McNamara
2005-01-17  4:42                   ` Eli Zaretskii
     [not found]                   ` <mailman.13604.1105938103.27204.help-gnu-emacs@gnu.org>
2005-01-17  6:04                     ` Tim McNamara
2005-01-17 11:38                       ` Peter Dyballa
     [not found]                       ` <mailman.13658.1105966339.27204.help-gnu-emacs@gnu.org>
2005-01-18  0:30                         ` Tim McNamara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2d5w68z2u.fsf@Althea.local \
    --to=timmcn@bitstream.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).