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: Mon, 17 Jan 2005 00:04:42 -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: Sun, 16 Jan 2005
>> 14:47:55 -0600
>> 
>> > You should put there whatever command-line switches that you want
>> > to pass to `pr'.
>> 
>> Thanks, unfortunately that gets me no further.  It is like you are
>> speaking another language that I don't understand and for which
>> there is no dictionary.
>> 
>> What is a "switch" in this context?
>
> The command-line switch to `pr'.  They are listed in the `pr's man
> page, and you already told here that you understood what switches
> you want, so I'm puzzled why you cannot continue.

Sorry this is confusing (but then I am confused, so I am not surprised
that it is contagious.  I find the man pages to be written in
something that resembles English, but isn't.).  Let's assume I
understand the Unix underpinnings of OS X just enough to screw things
up and not much more (which is pretty close to the truth- I've already
had to reinstall the operating system once thanks to screwing up some
libraries and rendering it unbootable).  What I wrote earlier was:

**********
"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?
**********

So this is the limit of my understanding about these switches, nothing
more than what I have written.  I am not even sure exactly what a
"switch" is in this context.


>> What value is placed in this field to be passed to "pr"?
>
> If you want to invoke `pr' like this:
>
>    pr -x foo -y bar
>
> then the value of lpr-headers-switches should be the list
>
>    ("-x" "foo" "-y" "bar")

So my best guess is that, if I want to change the number of lines per
page I would enter something like (assuming the parentheses are
necessary):

     ("-l" "50")

to invoke "pr" with the "-l" flag, specifying 50 lines per page?

>> There is no explanation of this in the manual, as far as I can
>> find.
>
> The doc string of lpr-headers-switches says that it is a list of
> strings.

Yah, the problem I am having is understanding what should be in those
strings. This comes from having used a GUI almost exclusively for 19
years and muddling about with Unix-like systems for only about 3
years- and even then, Mac OS X generally manages things like page
length automagically (Mac apps don't seem to invoke pr, lpr, etc as a
normal thing; pagination is handled within the text editing
application itself.  As a result, this is the first time I have ever
looked at pr, lpr, etc.).

Once again, thanks.  You're dealing with a normally functional person
who is over his head on simple stuff like this.  I've never used an
application with this much direct, fine grained control over its
operation, and at times it is baffling.

reply via email to

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