[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding to ps-print-hook problems

From: Klaus Berndl
Subject: Re: Adding to ps-print-hook problems
Date: 17 Sep 2002 13:33:23 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

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

This package offer you a function pr-ps-fast-fire which does pretty what you

If you have problems with configuring printing.el i can send you my


>  (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: address@hidden
sd&m AG               
software design & management    
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220

reply via email to

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