From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tim McNamara Newsgroups: gmane.emacs.help Subject: Re: Adjusting page length in "Print buffer" command Date: Mon, 17 Jan 2005 00:04:42 -0600 Organization: ipHouse Message-ID: References: <85oefrhmt0.fsf@obelix.seki.fr> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1105942093 13551 80.91.229.6 (17 Jan 2005 06:08:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Jan 2005 06:08:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 17 07:08:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CqQ3b-0003KV-00 for ; Mon, 17 Jan 2005 07:08:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CqQFO-0004em-V0 for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Jan 2005 01:20:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!worldnet.att.net!216.196.98.144!border2.nntp.dca.giganews.com!nntp.giganews.com!indigo.octanews.net!green.octanews.net!news-out.octanews.net!tan.iphouse.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (darwin) Cancel-Lock: sha1:7zqAMqefwWT2GzLgBxt9IYzblv8= Original-Lines: 93 Original-NNTP-Posting-Date: 17 Jan 2005 00:04:42 CST Original-X-Complaints-To: abuse@iphouse.net Original-Xref: shelby.stanford.edu gnu.emacs.help:127917 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23404 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23404 "Eli Zaretskii" writes: >> From: Tim McNamara 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.