From unknown Sat Sep 06 20:03:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12110 <12110@debbugs.gnu.org> To: bug#12110 <12110@debbugs.gnu.org> Subject: Status: 23.4; woman.el error on non-numeric arg Reply-To: bug#12110 <12110@debbugs.gnu.org> Date: Sun, 07 Sep 2025 03:03:32 +0000 retitle 12110 23.4; woman.el error on non-numeric arg reassign 12110 emacs submitter 12110 Kevin Ryde severity 12110 minor tag 12110 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 31 20:43:51 2012 Received: (at submit) by debbugs.gnu.org; 1 Aug 2012 00:43:51 +0000 Received: from localhost ([127.0.0.1]:53448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SwN2U-0001Uf-6H for submit@debbugs.gnu.org; Tue, 31 Jul 2012 20:43:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43752) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SwN2Q-0001UX-TO for submit@debbugs.gnu.org; Tue, 31 Jul 2012 20:43:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwMvG-0005RE-9V for submit@debbugs.gnu.org; Tue, 31 Jul 2012 20:36:24 -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, T_TVD_MIME_NO_HEADERS autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwMvG-0005RA-60 for submit@debbugs.gnu.org; Tue, 31 Jul 2012 20:36:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwMvE-00059q-AH for bug-gnu-emacs@gnu.org; Tue, 31 Jul 2012 20:36:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwMvC-0005Pa-2d for bug-gnu-emacs@gnu.org; Tue, 31 Jul 2012 20:36:20 -0400 Received: from mailout1-11.pacific.net.au ([125.255.80.130]:42569 helo=mailout3-syd3.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwMvB-0005Os-7O for bug-gnu-emacs@gnu.org; Tue, 31 Jul 2012 20:36:17 -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 7F2CD53A0EA for ; Wed, 1 Aug 2012 10:36:15 +1000 (EST) Received: from blah.blah (unknown [203.26.175.99]) by mailproxy4-syd3.pacific.net.au (Postfix) with ESMTP id 93B852C07C for ; Wed, 1 Aug 2012 10:36:10 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1SwMvC-0006fe-UA for bug-gnu-emacs@gnu.org; Wed, 01 Aug 2012 10:36:19 +1000 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.4; woman.el error on non-numeric arg Date: Wed, 01 Aug 2012 10:36:18 +1000 Message-ID: <87ehnrh2il.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.4 (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: -6.9 (------) 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 (------) --=-=-= Processing the file ip.1 below with (woman-find-file "ip.1") gets an error Symbol's function definition is void: nil with backtrace ip-backtrace.txt below. The .IP line in ip.1 is bad in that the indentation arg is not a number but I hoped woman would give some warning log and then continue formatting the rest. Putting the debugger on woman-parse-numeric-value suggests the two skip-syntax-forward calls end up putting point in the middle of the .SH request on the next line. I wonder if woman-parse-numeric-value should confine itself to the current line, per diff below. 2012-07-31 Kevin Ryde * woman.el (woman-parse-numeric-value): Don't go past end of line for a bad value or expression. Ensures point isn't moved part-way into a request on the following line, such as .IP "str" (notanumber) .SH FOO I struck this in the sdbm.3 man page http://cpansearch.perl.org/src/RJBS/perl-5.16.0/ext/SDBM_File/sdbm/sdbm.3 which has a bad .IP line for the author. Maybe the quotes should be on the whole string, but in any case it'd be good if woman didn't error out. .SH AUTHOR .IP "Ozan S. Yigit" (oz@nexus.yorku.ca) .SH BUGS --=-=-= Content-Disposition: attachment; filename=ip.1 .TH FOO 1 .SH AUTHOR .IP "some thing" (notanumber) .SH BUGS --=-=-= Content-Disposition: attachment; filename=ip-backtrace.txt Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (void-function nil) nil(0 0) funcall(nil 0 0) (setq value (funcall op value (woman-parse-numeric-value))) (cond ((looking-at "[+-/*%]") (forward-char) (setq op ...) (setq value ..= .)) ((looking-at "[<=3D>]=3D?") (goto-char ...) (setq op ...) (setq value .= ..)) ((memq ... ...) (forward-char) (setq value ...))) (while (cond (... ... ... ...) (... ... ... ...) (... ... ...))) (let ((value ...) op) (while (cond ... ... ...)) value) woman-parse-numeric-arg() (save-excursion (woman-parse-numeric-arg)) woman-get-numeric-arg() (let ((i ...)) (woman-delete-line) (or leave-eol (delete-char 1)) (if (> = i 0) (setq woman-prevailing-indent i))) (if (eolp) (or leave-eol (delete-char 1)) (let (...) (woman-delete-line) = (or leave-eol ...) (if ... ...))) woman2-get-prevailing-indent(leave-eol) (let ((i ...)) (beginning-of-line) (woman-leave-blank-lines) (unless (or = ... ...) (woman2-tagged-paragraph to i))) (if (eolp) (woman2-format-paragraphs to (+ woman-left-margin woman-prevai= ling-indent)) (woman-forward-arg (quote unquote)) (let (...) (beginning-of-= line) (woman-leave-blank-lines) (unless ... ...))) woman2-IP(#) funcall(woman2-IP #) (if (not (or fn ...)) nil (if (equal woman-request "TS") (set-marker to .= ..) (set-marker to ...)) (funcall fn to)) (while (re-search-forward woman-request-regexp nil t) (cond (... ...) (..= .) (... ... ...) (t ... ...)) (if (not ...) nil (if ... ... ...) (funcall f= n to))) (unwind-protect (while (re-search-forward woman-request-regexp nil t) (co= nd ... ... ... ...) (if ... nil ... ...)) (if (not ...) (woman2-format-para= graphs ... woman-left-margin)) (fset (quote canonically-space-region) canon= ically-space-region) (fset (quote set-text-properties) set-text-properties)= (fset (quote insert-and-inherit) insert-and-inherit) (set-marker to nil)) (let ((case-fold-search t) (to ...) (canonically-space-region ...) (inser= t-and-inherit ...) (set-text-properties ...) (woman-registers woman-registe= rs) fn woman-request woman-translations tab-stop-list) (set-marker-insertio= n-type to t) (fset (quote canonically-space-region) (quote ignore)) (fset (= quote insert-and-inherit) (symbol-function ...)) (fset (quote set-text-prop= erties) (quote ignore)) (unwind-protect (while ... ... ...) (if ... ...) (f= set ... canonically-space-region) (fset ... set-text-properties) (fset ... = insert-and-inherit) (set-marker to nil))) woman2-roff-buffer() (let ((case-fold-search nil) (woman-string-alist woman-string-alist) (wom= an-fill-column woman-fill-column) woman-negative-vertical-space) (setq woma= n-left-margin woman-default-indent woman-prevailing-indent woman-default-in= dent woman-interparagraph-distance 1 woman-leave-blank-lines nil woman-RS-l= eft-margin nil woman-RS-prevailing-indent nil woman-adjust woman-adjust-bot= h woman-justify (nth woman-adjust woman-justify-list) woman-nofill nil) (se= tq woman-if-conditions-true (cons ... ...)) (woman-non-underline-faces) (an= d woman-use-symbol-font (stringp woman-symbol-font) (set-face-font ... woma= n-symbol-font ...)) (set-syntax-table woman-syntax-table) (woman-set-buffer= -display-table) (if (or woman-fill-frame ...) (setq woman-fill-column ...))= (goto-char from) (if (looking-at "'\\\\\"[ ]*\\([a-z]+\\)") (let ... ... = ... ...)) (woman-pre-process-region from nil) (woman0-roff-buffer from) (go= to-char (point-min)) (let (...) (unless ... ...)) (goto-char from) (woman-m= ark-horizonal-position) (setq fill-column woman-fill-column tab-width woman= -tab-width) (goto-char from) (while (re-search-forward "\\\\[ 0]" nil t) (r= eplace-match woman-unpadded-space-string t t)) (goto-char from) (while (re-= search-forward "\\\\\\([%\n]\\|s[-+]?[0-9]+\\)" nil t) (woman-delete-match = 0)) (goto-char from) (while (re-search-forward "\\\\\\([-`.]\\)" nil t) (re= place-match "\\1")) (goto-char from) (woman1-roff-buffer) (goto-char from) = (woman-strings) (goto-char from) (woman-change-fonts) (goto-char from) (let= (...) (while ... ...)) (goto-char from) (woman2-roff-buffer) (if woman-neg= ative-vertical-space (woman-negative-vertical-space from)) (when woman-pres= erve-ascii (subst-char-in-region from ... woman-escaped-escape-char 92) (su= bst-char-in-region from ... woman-unpadded-space-char 32)) (point-max)) woman-decode-region(1 61) (let ((start-time ...) time) (message "WoMan formatting buffer...") (woma= n-decode-region (point-min) (point-max)) (setq time (float-time ...)) (mess= age "WoMan formatting buffer...done in %g seconds" time) (WoMan-log-end tim= e)) woman-decode-buffer() (if (re-search-forward "^[.']" 1000 t) (woman-decode-buffer) (message "Fi= le appears to be pre-formatted -- using source file may be better.") (woman= -man-buffer)) woman-process-buffer() (let ((WoMan-current-file filename)) (if woman-use-own-frame (select-fram= e ...)) (set-buffer (get-buffer-create bufname)) (condition-case nil (switc= h-to-buffer ...) (error ...)) (buffer-disable-undo) (setq buffer-read-only = nil) (erase-buffer) (woman-insert-file-contents filename compressed) (setq = default-directory (file-name-directory filename)) (set (make-local-variable= ...) t) (set-visited-file-name "") (woman-process-buffer)) woman-really-find-file("/so/woman/ip.1" nil "*WoMan 1 ip*") (let* ((bufname ...) (case-fold-search t) (compressed ...)) (if compresse= d (setq bufname ...)) (setq bufname (if exists ... ...)) (woman-really-find= -file file-name compressed bufname) (or exists (setq woman-buffer-alist ...= woman-buffer-number 0))) (or (and (setq exists ...) (not reformat)) (let* (... ... ...) (if compre= ssed ...) (setq bufname ...) (woman-really-find-file file-name compressed b= ufname) (or exists ...))) (let ((alist-tail woman-buffer-alist) exists) (setq woman-buffer-number 0= ) (while (and alist-tail ...) (setq alist-tail ... woman-buffer-number ...)= ) (or (and ... ...) (let* ... ... ... ... ...))) woman-find-file("ip.1") eval((woman-find-file "ip.1")) eval-expression((woman-find-file "ip.1") nil) call-interactively(eval-expression nil nil) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=woman.el.badnumeric.diff --- woman-24.el 2012-07-09 12:07:42.000000000 +1000 +++ woman.el 2012-07-31 10:16:26.000000000 +1000 @@ -3588,7 +3588,7 @@ (let (n) (forward-char) (setq n (woman-parse-numeric-arg)) - (skip-syntax-forward " ") + (skip-syntax-forward " " (line-end-position)) (if (eq (following-char) ?\)) (forward-char) (WoMan-warn "Parenthesis confusion in numeric expression!")) @@ -3640,7 +3640,7 @@ (buffer-substring (point) (line-end-position))) - (skip-syntax-forward "^ ") + (skip-syntax-forward "^ " (line-end-position)) 0) (goto-char (match-end 0)) ;; Check for scale factor: --=-=-= In GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-08 on biber, 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/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/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 -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' '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 debbugs-submit-bounces@debbugs.gnu.org Tue Aug 07 00:05:37 2012 Received: (at 12110) by debbugs.gnu.org; 7 Aug 2012 04:05:37 +0000 Received: from localhost ([127.0.0.1]:38492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Syb33-000275-5s for submit@debbugs.gnu.org; Tue, 07 Aug 2012 00:05:37 -0400 Received: from mail-gh0-f172.google.com ([209.85.160.172]:51464) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Syb32-00026z-5y for 12110@debbugs.gnu.org; Tue, 07 Aug 2012 00:05:36 -0400 Received: by ghbg16 with SMTP id g16so1073665ghb.3 for <12110@debbugs.gnu.org>; Mon, 06 Aug 2012 20:57:38 -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=gpOjSElgJP7c1q/ETOgKcJvYGtM6NUHTa0qSiQLhTpI=; b=i3MPDfA+CODAxHm6MJCzibCkLHZZkd0CDlBG6+YevYGePjW+4GKZgPTielHxS/Id6x G74UquATYVaVzQklXzdonx7nHTmh5vjDEZ0iF8DZcEuCaAQdj+X2hlDLyNdaw/CZ+nbz ACgrhxJ7OflYEaU7IaWZTjuxSxd24s6QlxkoDP0vA7suGPUmDeWXIn3AMZ/YYtecp/D1 Uar5CeHtJjeTgw8r3de0T9Hd9FOtiRrT3H0oP6gGyGdf0MbNRQWp5NdRPefbZPBiEONn NCxajqXqMK3YEnEHEnZ6kyNrYMbeEzT/N20ki2yNy/Vb2W8bWgvGtrU4guz9HvmDVibX nv3w== Received: by 10.66.75.74 with SMTP id a10mr22961993paw.46.1344311857950; Mon, 06 Aug 2012 20:57:37 -0700 (PDT) Received: from ulysses ([155.69.17.229]) by mx.google.com with ESMTPS id pi7sm10259275pbb.56.2012.08.06.20.57.35 (version=SSLv3 cipher=OTHER); Mon, 06 Aug 2012 20:57:37 -0700 (PDT) From: Chong Yidong To: Kevin Ryde Subject: Re: bug#12110: 23.4; woman.el error on non-numeric arg References: <87ehnrh2il.fsf@blah.blah> Date: Tue, 07 Aug 2012 11:57:32 +0800 In-Reply-To: <87ehnrh2il.fsf@blah.blah> (Kevin Ryde's message of "Wed, 01 Aug 2012 10:36:18 +1000") Message-ID: <87d333z74j.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12110 Cc: 12110@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: -2.6 (--) Kevin Ryde writes: > I wonder if woman-parse-numeric-value should confine itself to the > current line, per diff below. Thanks, I've committed your patch to trunk. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 07 00:05:49 2012 Received: (at control) by debbugs.gnu.org; 7 Aug 2012 04:05:49 +0000 Received: from localhost ([127.0.0.1]:38495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Syb3F-00027U-CS for submit@debbugs.gnu.org; Tue, 07 Aug 2012 00:05:49 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:41051) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Syb3E-00027O-3t for control@debbugs.gnu.org; Tue, 07 Aug 2012 00:05:48 -0400 Received: by pbbrr4 with SMTP id rr4so5002908pbb.3 for ; Mon, 06 Aug 2012 20:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=3w/v+38GGN8ASo+cHMI8X5VDDmYF+xiYgdpIIgagOKk=; b=hc6DJsXIPf8iUC5SC6uncs4h+RtUt9vzro+CV6AsEltayiK90WXaT3NpVjiXQyqtoS GusV1gmviS9E/wPBWuIjRnz12p+avygMwO6/H2Jy8oG5f7f8btSgTPnIHYQ1ml9M5YEA OF8jXPRv3iUTBhwwMt47atGkLWB2eGjEw8qKNQ4MlNaKHBmLDV/deLpUYBLQy0BfWbHU FJfLm0zo37dVJzitRsJSbNrZnvslbVZcow4Yq7x2zcc3liwqgfUy90/Ihln8m12Ai5qR ljkbhFLlmZ2WuKv3/5Btbb4JqDpM/c+JVWpxdcVMZ4MbureRuTQc9V4LMp+4J4aOnmYd KCsg== Received: by 10.68.200.101 with SMTP id jr5mr24631266pbc.9.1344311870825; Mon, 06 Aug 2012 20:57:50 -0700 (PDT) Received: from ulysses ([155.69.17.229]) by mx.google.com with ESMTPS id iq1sm6689200pbc.37.2012.08.06.20.57.48 (version=SSLv3 cipher=OTHER); Mon, 06 Aug 2012 20:57:49 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 12109 Date: Tue, 07 Aug 2012 11:57:45 +0800 Message-ID: <87obmnpd52.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control 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: -2.6 (--) close 12109 close 12110 thanks From unknown Sat Sep 06 20:03:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Sep 2012 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator