From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.bugs Subject: bug#1138: 23.0.60; ps-print.el error with unusual page sizes Date: Wed, 15 Oct 2008 23:11:37 -0200 Message-ID: <48F694C9.4090505@ig.com.br> References: <87r66mg6d6.fsf@cyd.mit.edu> Reply-To: Vinicius Jose Latorre , 1138@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224120616 16816 80.91.229.12 (16 Oct 2008 01:30:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2008 01:30:16 +0000 (UTC) Cc: 1138@emacsbugs.donarmstrong.com To: Chong Yidong , friedel@nomaden.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 16 03:31:15 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KqHhr-0001e7-2f for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Oct 2008 03:31:15 +0200 Original-Received: from localhost ([127.0.0.1]:52947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqHgm-00018H-4J for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Oct 2008 21:30:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqHgi-00018C-4O for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2008 21:30:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqHgg-00017o-Q2 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2008 21:30:03 -0400 Original-Received: from [199.232.76.173] (port=43075 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqHgg-00017l-I1 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2008 21:30:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46383) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KqHgg-0000AP-4P for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2008 21:30:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9G1Txr6021944; Wed, 15 Oct 2008 18:30:00 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9G1K2kV019644; Wed, 15 Oct 2008 18:20:02 -0700 X-Loop: don@donarmstrong.com Resent-From: Vinicius Jose Latorre Original-Sender: Vinicius =?UTF-8?Q?Jos=C3=A9?= Latorre Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Oct 2008 01:20:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1138 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1138-submit@emacsbugs.donarmstrong.com id=B1138.122411953418424 (code B ref 1138); Thu, 16 Oct 2008 01:20:02 +0000 Original-Received: (at 1138) by emacsbugs.donarmstrong.com; 16 Oct 2008 01:12:14 +0000 Original-Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9G1CBA0018418 for <1138@emacsbugs.donarmstrong.com>; Wed, 15 Oct 2008 18:12:12 -0700 Original-Received: by qw-out-2122.google.com with SMTP id 9so1101810qwb.13 for <1138@emacsbugs.donarmstrong.com>; Wed, 15 Oct 2008 18:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=HV/eR9N6cHnUIe4sDxYjAAcwdW43NMioTapWhnkOPNs=; b=oZY7iHcXZY8Pm1YtahxldJ2ampbXza+2GtTjskfpUJ7+JqO9U4c/pHZAL++9Oijb/Y lyZnQpl2U+J8eQagwdStSa4Gplx3PsRMYDnD3TM2moy5DvInGtJm/zvgTKA3V/IWF+Pd Ez2ccCFh2T6Aa0hMJEU8juGl7wrrtu9edi9aM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=AntrNDAqIws5pcPujuZO0zAlK1SdGyxkH+OuJLTvrnLK1ANbzoGc6RsxXaEQENG/IQ 1xKJV03f/GCWTfIS2yNn0JKqC4UHD/qNHYY9VGKAQsBpZ2X9SPO3VWKAGVTPz3cd6Fhr 0xqy3vCaaErGNdW8YymYRLX/0jDJ4HWKCa5Yk= Original-Received: by 10.215.41.10 with SMTP id t10mr2110500qaj.62.1224119529695; Wed, 15 Oct 2008 18:12:09 -0700 (PDT) Original-Received: from ?192.168.0.101? ([201.82.12.112]) by mx.google.com with ESMTPS id 5sm413759qwh.2.2008.10.15.18.12.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Oct 2008 18:12:08 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080829 SeaMonkey/1.1.12 In-Reply-To: <87r66mg6d6.fsf@cyd.mit.edu> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 15 Oct 2008 21:30:03 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21512 Archived-At: Hi Friedrich, > Friedrich Delgado Friedrichs 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")) >> Ok, it seems ok to add these two new entries into ps-page-dimensions-database. >> 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. >> Well, the right thing to do is to add new entries into ps-n-up-database, like: (defconst ps-n-up-database '(...... (shipping (100 nil 1 1 0)) (topcoated (100 nil 1 1 0))) ...) Please, try the change above and let me know the results. Does it make sense to have ps-n-up-printing > 1 for these 2 new entries?? ps-print does not deal with paper sizes which only can have 1 n-up, but it's possible to change this if this is the case. Thanks for your contribution, Vinicius