all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim McNamara <timmcn@bitstream.net>
Subject: Re: Adjusting page length in "Print buffer" command
Date: Mon, 17 Jan 2005 00:04:42 -0600	[thread overview]
Message-ID: <m2u0pglhfp.fsf@Stella-Blue.local> (raw)
In-Reply-To: mailman.13604.1105938103.27204.help-gnu-emacs@gnu.org

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

  parent reply	other threads:[~2005-01-17  6:04 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
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 [this message]
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

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

  git send-email \
    --in-reply-to=m2u0pglhfp.fsf@Stella-Blue.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.