From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Berndl Newsgroups: gmane.emacs.help Subject: Re: Adding to ps-print-hook problems Date: 17 Sep 2002 13:33:23 +0200 Organization: UTA/netway (Customer) Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1032263158 1538 127.0.0.1 (17 Sep 2002 11:45:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 17 Sep 2002 11:45:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17rGnl-0000Og-00 for ; Tue, 17 Sep 2002 13:45:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17rGo2-00013g-00; Tue, 17 Sep 2002 07:46:14 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!newsfeed.completel.de!news.netway.at!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 56 Original-NNTP-Posting-Host: 195.96.24.28 Original-X-Trace: newsreader1.netway.at 1032262599 23106 195.96.24.28 (17 Sep 2002 11:36:39 GMT) Original-X-Complaints-To: abuse@netway.at Original-NNTP-Posting-Date: 17 Sep 2002 11:36:39 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 X-Forwarded: by - (DeleGate/7.5.3) Original-Xref: nntp.stanford.edu comp.emacs:74555 gnu.emacs.help:104974 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1529 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1529 On Mon, 16 Sep 2002, Jeff Rancier wrote: > Hi all. I wanted to create a simple function to prompt me for the n-up > number of pages to print when I run the function, > ps-print-buffer-with-faces. Here's what I came up with: > > (defun jbr-ps-print-n-up-hook (number-of-pages) > (interactive "nN-up number of pages: ") > (setq ps-n-up-printing number-of-pages)) I would strongly recommend the package printing.el from the author of ps-print which offers you a great interface (keyboard and mouse!) for all the ps-print stuff and much more. IMHO the combination of printing.el and ps-print.el really rocks. And IMHO i do not understand why printing.el is not in the distribution of Emacs 21.X?! Get it from http://www.cpqd.com.br/~vinicius/emacs/. This package offer you a function pr-ps-fast-fire which does pretty what you want! If you have problems with configuring printing.el i can send you my configuration... Ciao, Klaus > > (add-hook 'ps-print-hook 'jbr-ps-print-n-up-hook) > > I thought that was pretty straight forward. When I select that from the > menu-bar, I get the following in my *Messages* buffer: > > Debugger entered--Lisp error: (wrong-number-of-arguments (lambda > (number-of-pages) (interactive "nN-up number of pages: ") (setq > ps-n-up-printing number-of-pages)) 0) > jbr-ps-print-n-up-hook() > run-hooks(ps-print-hook) > ps-spool-with-faces(1 2947 nil) > ps-print-with-faces(1 2947 nil) > ps-print-buffer-with-faces(nil) > * call-interactively(ps-print-buffer-with-faces) > > Is that the wrong-number-of-arguments to run-hooks? And if so, is that a > bug in ps-print? Or am I incorrectly writing my hook, > jbr-ps-print-n-up-hook? I am simply calling ps-print-buffer-with-faces() > incorrectly, now that it is interactive? > > Jeff -- Klaus Berndl mailto: klaus.berndl@sdm.de sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220