From unknown Mon Aug 18 02:31:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12639: 24.1; woman.el points vs pica scaling Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Oct 2012 00:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12639@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13501735904099 (code B ref -1); Sun, 14 Oct 2012 00:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2012 00:13:10 +0000 Received: from localhost ([127.0.0.1]:42920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNBpO-000144-Ew for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:13:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48244) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNBpL-00013r-F8 for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:13:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNBoI-0005r1-H2 for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:12:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBoI-0005qx-E2 for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:12:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBoG-0000WG-Rq for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:12:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNBoF-0005qh-Dw for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:12:00 -0400 Received: from mailout1-13.pacific.net.au ([125.255.80.132]:36884 helo=mailout3-syd3.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBoE-0005qE-SX for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:11:59 -0400 Received: from mailproxy4-syd3.pacific.net.au (mailproxy4-syd3.pacific.net.au [61.8.2.162]) by mailout3-syd3.pacific.net.au (Postfix) with ESMTP id E476B6B824B for ; Sun, 14 Oct 2012 11:11:53 +1100 (EST) Received: from blah.blah (unknown [203.26.175.18]) by mailproxy4-syd3.pacific.net.au (Postfix) with ESMTP id C17B72C06C for ; Sun, 14 Oct 2012 11:11:52 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1TNBnM-00005r-4G for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 11:11:04 +1100 From: Kevin Ryde Date: Sun, 14 Oct 2012 11:11:03 +1100 Message-ID: <87pq4lvroo.fsf@blah.blah> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain The file picapoints.1 viewed with M-x woman-find-file picapoints.1 gives 12 point spacing xxx 12 picas spacing xxx where I expected that "12p" points would be much less than "12P" picas, something like maybe 12 point spacing xxx 12 picas spacing xxx It looks like case-fold-search is true in woman-parse-numeric-value causing "p" points and "P" picas not to be distinguished. I can't tell if that's meant to be so. There seems to be duelling `let's of case significance. Ensuring it where it matters per diff below might be a good idea. 2012-10-14 Kevin Ryde * woman.el (woman-parse-numeric-value): case-fold-search nil to ensure "p" points and "P" picas scaling are distinguished as intended. I struck this on output from recent perl pod2man where there's some spacing to make "C++" look good, per cplusplus.1 below. It's meant for troff, but when woman wrongly takes it as 1 pica instead of 1 point the movement forward and back doesn't add up and a space after the construct is lost, so giving Blah C^++blah. With case-significance fixed it becomes the intended Blah C^++ blah. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=picapoints.1 .TH FOO 1 .SH NAME 12 point spacing \h'12p' xxx .P 12 picas spacing \h'12P' xxx --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=woman.el.picas.diff --- woman.el.orig 2012-10-14 10:41:57.000000000 +1100 +++ woman.el 2012-10-14 10:56:45.000000000 +1100 @@ -3627,16 +3627,17 @@ (goto-char (match-end 0)) ;; Check for scale factor: (if - (cond - ((looking-at "\\s ") nil) ; stay put! - ((looking-at "[mnuv]")) ; ignore for now - ((looking-at "i") (setq n (* n 10))) ; inch - ((looking-at "c") (setq n (* n 3.9))) ; cm - ((looking-at "P") (setq n (* n 1.7))) ; Pica - ((looking-at "p") (setq n (* n 0.14))) ; point - ;; NB: May be immediately followed by + or -, etc., - ;; in which case do nothing and return nil. - ) + (let ((case-fold-search nil)) + (cond + ((looking-at "\\s ") nil) ; stay put! + ((looking-at "[mnuv]")) ; ignore for now + ((looking-at "i") (setq n (* n 10))) ; inch + ((looking-at "c") (setq n (* n 3.9))) ; cm + ((looking-at "P") (setq n (* n 1.7))) ; Pica + ((looking-at "p") (setq n (* n 0.14))) ; point + ;; NB: May be immediately followed by + or -, etc., + ;; in which case do nothing and return nil. + )) (goto-char (match-end 0))) (if (numberp n) (round n) n))))) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=cplusplus.1 .TH FOO 1 .SH NAME .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' Blah \*(C+ blah. --=-=-= Content-Type: text/plain In GNU Emacs 24.1.1 (i486-pc-linux-gnu, GTK+ Version 2.24.8) of 2012-08-07 on blah.blah, modified by Debian Configured using: `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t --=-=-=-- From unknown Mon Aug 18 02:31:27 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kevin Ryde Subject: bug#12639: closed (Re: bug#12639: 24.1; woman.el points vs pica scaling) Message-ID: References: <87ip9tin7k.fsf@gnu.org> <87pq4lvroo.fsf@blah.blah> X-Gnu-PR-Message: they-closed 12639 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 12639@debbugs.gnu.org Date: Mon, 29 Oct 2012 10:35:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1351506902-20599-1" This is a multi-part message in MIME format... ------------=_1351506902-20599-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12639: 24.1; woman.el points vs pica scaling which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12639@debbugs.gnu.org. --=20 12639: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12639 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1351506902-20599-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12639-done) by debbugs.gnu.org; 29 Oct 2012 10:34:04 +0000 Received: from localhost ([127.0.0.1]:37468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSmfT-0005L4-MM for submit@debbugs.gnu.org; Mon, 29 Oct 2012 06:34:03 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:42384) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSmfQ-0005Kf-BF for 12639-done@debbugs.gnu.org; Mon, 29 Oct 2012 06:34:01 -0400 Received: by mail-da0-f44.google.com with SMTP id h15so2275399dan.3 for <12639-done@debbugs.gnu.org>; Mon, 29 Oct 2012 03:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=mzK46dIQvsz0NbLColcy/AUxdAqfIN0kEoNsyTVMTJ4=; b=Zh8hfojCmO1TZXzTN9KBmet4O4CZngXXk9zLPNcP4TH0W7T39Z5CKL3gC9Ncd88W1H 1LNUZtSCwdEgrl9JoA/7rBhKp8oXRGdDwlJUd/h+QA0fdZyY46+AJH6Xi/J2G56A6kk9 0fm/K2lnW+GB4fqG2fIewzZPfG9nYr/TdKnMCRb6Ol1WNCWtBBQoNTkjVOTjH/BLtVQl Hg+DdtKU+gSlrUMYzBxaLmhbwGi8nzLMxhTKXikni27SHnMwNi5ggISUaHPdr0rKIeXU r9BUX2OIUnbxKPw+lGN652vit8AWcjJSGw47oAqxEn4kl9GlpXs5RisUGbz5B5X9eOKA 8X+Q== Received: by 10.66.78.69 with SMTP id z5mr82092512paw.14.1351506694300; Mon, 29 Oct 2012 03:31:34 -0700 (PDT) Received: from ulysses ([155.69.16.22]) by mx.google.com with ESMTPS id ok3sm5799485pbb.11.2012.10.29.03.31.31 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 03:31:33 -0700 (PDT) From: Chong Yidong To: Kevin Ryde Subject: Re: bug#12639: 24.1; woman.el points vs pica scaling References: <87pq4lvroo.fsf@blah.blah> Date: Mon, 29 Oct 2012 18:31:27 +0800 In-Reply-To: <87pq4lvroo.fsf@blah.blah> (Kevin Ryde's message of "Sun, 14 Oct 2012 11:11:03 +1100") Message-ID: <87ip9tin7k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12639-done Cc: 12639-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Kevin Ryde writes: > I can't tell if that's meant to be so. There seems to be duelling > `let's of case significance. Ensuring it where it matters per diff > below might be a good idea. > > 2012-10-14 Kevin Ryde > > * woman.el (woman-parse-numeric-value): case-fold-search nil to ensure > "p" points and "P" picas scaling are distinguished as intended. Thanks. I committed a more conservative version of the patch, binding case-fold-search to nil only around (looking-at "P"). ------------=_1351506902-20599-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Oct 2012 00:13:10 +0000 Received: from localhost ([127.0.0.1]:42920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNBpO-000144-Ew for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:13:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48244) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNBpL-00013r-F8 for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:13:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNBoI-0005r1-H2 for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:12:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBoI-0005qx-E2 for submit@debbugs.gnu.org; Sat, 13 Oct 2012 20:12:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBoG-0000WG-Rq for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:12:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNBoF-0005qh-Dw for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:12:00 -0400 Received: from mailout1-13.pacific.net.au ([125.255.80.132]:36884 helo=mailout3-syd3.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBoE-0005qE-SX for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:11:59 -0400 Received: from mailproxy4-syd3.pacific.net.au (mailproxy4-syd3.pacific.net.au [61.8.2.162]) by mailout3-syd3.pacific.net.au (Postfix) with ESMTP id E476B6B824B for ; Sun, 14 Oct 2012 11:11:53 +1100 (EST) Received: from blah.blah (unknown [203.26.175.18]) by mailproxy4-syd3.pacific.net.au (Postfix) with ESMTP id C17B72C06C for ; Sun, 14 Oct 2012 11:11:52 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1TNBnM-00005r-4G for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 11:11:04 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 24.1; woman.el points vs pica scaling Date: Sun, 14 Oct 2012 11:11:03 +1100 Message-ID: <87pq4lvroo.fsf@blah.blah> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain The file picapoints.1 viewed with M-x woman-find-file picapoints.1 gives 12 point spacing xxx 12 picas spacing xxx where I expected that "12p" points would be much less than "12P" picas, something like maybe 12 point spacing xxx 12 picas spacing xxx It looks like case-fold-search is true in woman-parse-numeric-value causing "p" points and "P" picas not to be distinguished. I can't tell if that's meant to be so. There seems to be duelling `let's of case significance. Ensuring it where it matters per diff below might be a good idea. 2012-10-14 Kevin Ryde * woman.el (woman-parse-numeric-value): case-fold-search nil to ensure "p" points and "P" picas scaling are distinguished as intended. I struck this on output from recent perl pod2man where there's some spacing to make "C++" look good, per cplusplus.1 below. It's meant for troff, but when woman wrongly takes it as 1 pica instead of 1 point the movement forward and back doesn't add up and a space after the construct is lost, so giving Blah C^++blah. With case-significance fixed it becomes the intended Blah C^++ blah. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=picapoints.1 .TH FOO 1 .SH NAME 12 point spacing \h'12p' xxx .P 12 picas spacing \h'12P' xxx --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=woman.el.picas.diff --- woman.el.orig 2012-10-14 10:41:57.000000000 +1100 +++ woman.el 2012-10-14 10:56:45.000000000 +1100 @@ -3627,16 +3627,17 @@ (goto-char (match-end 0)) ;; Check for scale factor: (if - (cond - ((looking-at "\\s ") nil) ; stay put! - ((looking-at "[mnuv]")) ; ignore for now - ((looking-at "i") (setq n (* n 10))) ; inch - ((looking-at "c") (setq n (* n 3.9))) ; cm - ((looking-at "P") (setq n (* n 1.7))) ; Pica - ((looking-at "p") (setq n (* n 0.14))) ; point - ;; NB: May be immediately followed by + or -, etc., - ;; in which case do nothing and return nil. - ) + (let ((case-fold-search nil)) + (cond + ((looking-at "\\s ") nil) ; stay put! + ((looking-at "[mnuv]")) ; ignore for now + ((looking-at "i") (setq n (* n 10))) ; inch + ((looking-at "c") (setq n (* n 3.9))) ; cm + ((looking-at "P") (setq n (* n 1.7))) ; Pica + ((looking-at "p") (setq n (* n 0.14))) ; point + ;; NB: May be immediately followed by + or -, etc., + ;; in which case do nothing and return nil. + )) (goto-char (match-end 0))) (if (numberp n) (round n) n))))) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=cplusplus.1 .TH FOO 1 .SH NAME .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' Blah \*(C+ blah. --=-=-= Content-Type: text/plain In GNU Emacs 24.1.1 (i486-pc-linux-gnu, GTK+ Version 2.24.8) of 2012-08-07 on blah.blah, modified by Debian Configured using: `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t --=-=-=-- ------------=_1351506902-20599-1--