From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#12639: 24.1; woman.el points vs pica scaling Date: Sun, 14 Oct 2012 11:11:03 +1100 Message-ID: <87pq4lvroo.fsf@blah.blah> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1350173588 24211 80.91.229.3 (14 Oct 2012 00:13:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2012 00:13:08 +0000 (UTC) To: 12639@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 02:13:15 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TNBpT-0007Ho-3P for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2012 02:13:15 +0200 Original-Received: from localhost ([::1]:53239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBpM-0000jb-CO for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Oct 2012 20:13:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBpJ-0000ij-Ho for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNBpI-00060W-EO for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:13:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNBpI-00060S-Au for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:13:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TNBqE-00015J-Gp for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 20:14:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13501735904099 (code B ref -1); Sun, 14 Oct 2012 00:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Oct 2012 00:13:10 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) Original-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 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65574 Archived-At: --=-=-= 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 --=-=-=--