From: Chong Yidong <cyd@stupidchicken.com>
To: Vinicius Jose Latorre <viniciusjl@ig.com.br>
Cc: 1138@emacsbugs.donarmstrong.com
Subject: bug#1138: 23.0.60; ps-print.el error with unusual page sizes
Date: Sat, 11 Oct 2008 17:38:13 -0400 [thread overview]
Message-ID: <87r66mg6d6.fsf@cyd.mit.edu> (raw)
Hi,
Could you take a look at this bug report against ps-print.el? Is the
attached patch safe to apply? Thanks!
Friedrich Delgado Friedrichs <friedel@nomaden.org> wrote:
> ps-print.el from current cvs uses non-exhaustive cases in the function
> ps-n-up-printing, if a page size symbol does not match any of the
> cars in ps-n-up-database.
>
> The background of this is that I'm using a label printer with maximum
> 54mm (nominally, really 136 points, 47mm) width to print labels and
> small leaflets.
>
> My ps-page-dimensions-database looks like this:
>
> ((a4 595.275590551181 841.8897637795276 "A4")
> (a3 841.8897637795276 1190.551181102362 "A3")
> (letter 612.0 792.0 "Letter")
> (legal 612.0 1008.0 "Legal")
> (letter-small 552.96 731.52 "LetterSmall")
> (tabloid 792.0 1224.0 "Tabloid")
> (ledger 1224.0 792.0 "Ledger")
> (statement 396.0 612.0 "Statement")
> (executive 540.0 720.0 "Executive")
> (a4small 537.84 781.1999999999999 "A4Small")
> (b4 729.0 1031.76 "B4")
> (b5 515.52 729.0 "B5")
> (shipping 271 136 "Shipping")
> (topcoated 425.19685 136 "TopCoatedPaper"))
>
> The next to last entries are the relevant ones. If ps-paper-type is
> set to 'topcoated or 'shipping, ps-n-up-printing returns nil, causing
> an error in the format for the page header later.
>
> ps-n-up-printing being set to 1
>
> This quick workaround fixes this for me:
--- ps-print.el.~1.219.~ 2008-05-20 00:03:17.000000000 +0200
+++ ps-print.el 2008-10-10 20:28:05.000000000 +0200
@@ -5256,7 +5256,8 @@
(and the-list
(while (> ps-n-up-printing (caar the-list))
(setq the-list (cdr the-list))))
- (car the-list)))
+ (or (car the-list)
+ '(1 nil 1 1 0))))
(defconst ps-n-up-filling-database
> However you might want to apply a more general fix for the
> distribution.
next reply other threads:[~2008-10-11 21:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-11 21:38 Chong Yidong [this message]
2008-10-16 1:11 ` bug#1138: 23.0.60; ps-print.el error with unusual page sizes Vinicius Jose Latorre
2008-10-16 11:58 ` Friedrich Delgado Friedrichs
2008-10-17 2:05 ` Vinicius Jose Latorre
-- strict thread matches above, loose matches on Subject: below --
2008-11-08 17:22 Chong Yidong
2008-11-10 0:33 ` Vinicius Jose Latorre
2008-10-10 18:47 Friedrich Delgado Friedrichs
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r66mg6d6.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=1138@emacsbugs.donarmstrong.com \
--cc=viniciusjl@ig.com.br \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).