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: Sat, 15 Jan 2005 09:57:29 -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 1105804693 27348 80.91.229.6 (15 Jan 2005 15:58:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Jan 2005 15:58:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 15 16:58:05 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 1CpqJR-0003t1-00 for ; Sat, 15 Jan 2005 16:58:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CpqVC-0003Je-BF for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Jan 2005 11:10:14 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!news.glorb.com!green.octanews.net!news-out.octanews.net!beige.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:7eBJjWlVv5li7TpTiHQBfzR1LBE= Original-Lines: 72 Original-NNTP-Posting-Date: 15 Jan 2005 09:56:37 CST Original-X-Complaints-To: abuse@iphouse.net Original-Xref: shelby.stanford.edu gnu.emacs.help:127878 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:23365 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23365 "Eli Zaretskii" writes: >> From: Tim McNamara 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 . > (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!