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#12756: 24.2; woman.el vs adaptive-fill-mode hanging indent Date: Mon, 29 Oct 2012 08:44:26 +1100 Message-ID: <87y5iqclvp.fsf@blah.blah> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1351462309 6546 80.91.229.3 (28 Oct 2012 22:11:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 22:11:49 +0000 (UTC) To: 12756@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 23:11:57 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 1TSb5F-0001HZ-23 for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 23:11:53 +0100 Original-Received: from localhost ([::1]:56510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSb56-0001mf-OW for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 18:11:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSb53-0001mP-2A for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:11:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSb51-0005HP-To for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:11:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSb51-0005HJ-Q7 for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:11:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TSb7J-0002fO-L9 for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:14:01 -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, 28 Oct 2012 22:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12756 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.135146239310182 (code B ref -1); Sun, 28 Oct 2012 22:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Oct 2012 22:13:13 +0000 Original-Received: from localhost ([127.0.0.1]:37018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSb6W-0002eA-GC for submit@debbugs.gnu.org; Sun, 28 Oct 2012 18:13:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58941) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TSb6T-0002e2-Kt for submit@debbugs.gnu.org; Sun, 28 Oct 2012 18:13:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSb4A-0005DV-42 for submit@debbugs.gnu.org; Sun, 28 Oct 2012 18:10:47 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:37849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSb4A-0005DR-0f for submit@debbugs.gnu.org; Sun, 28 Oct 2012 18:10:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSb48-0001aG-TP for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:10:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSb47-0005CO-9H for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:10:44 -0400 Original-Received: from mailout2-14.pacific.net.au ([125.255.80.141]:40543 helo=mailout4-syd3.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSb46-0004ly-IL for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2012 18:10:43 -0400 Original-Received: from mailproxy4-syd3.pacific.net.au (mailproxy4-syd3.pacific.net.au [61.8.2.162]) by mailout4-syd3.pacific.net.au (Postfix) with ESMTP id B97B11205BA for ; Mon, 29 Oct 2012 08:45:00 +1100 (EST) Original-Received: from blah.blah (unknown [203.26.175.161]) by mailproxy4-syd3.pacific.net.au (Postfix) with ESMTP id 8B4022C06D for ; Mon, 29 Oct 2012 08:44:59 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1TSaej-0002nR-Ve for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 08:44:35 +1100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (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:66160 Archived-At: --=-=-= Content-Type: text/plain With the file percent.1 below and an 80-column screen the file percent.1 below processed with M-x woman-find-file percent.1 gives %%%%Some percents one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen. Where I expected %%%%Some percents one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen. It seems woman.el uses fill-region-as-paragraph and that adaptive-fill-mode, which is t by default, causes the "%"s in the input to become a fill prefix. I think that shouldn't be done, that instead woman.el should control all indentation. It seems this only affects roff source where the paragraph flowed is a single line of the input. You can make a very long input line to see multiple hanging lines in the output. Various other prefix characters in adaptive-fill-regexp are affected similarly, eg "#" instead of "%". I get some joy from forcing adaptive-fill-mode off in woman-decode-region. 2012-10-27 Kevin Ryde * woman.el (woman-decode-region): Let-bind adaptive-fill-mode nil so a paragraph consisting of a single long input line "%%Foo ..." doesn't have "%" treated as a hanging indent. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=percent.1 .TH FOO 1 .SH NAME %%%%Some percents one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=woman.el.adaptive-fill.diff --- woman.el.orig 2012-10-27 16:21:40.000000000 +1100 +++ woman.el 2012-10-27 16:25:06.000000000 +1100 @@ -2228,6 +2228,7 @@ ;; it were it would need to be a marker rather than a position! ;; First force the correct environment: (let ((case-fold-search nil) ; This is necessary! + (adaptive-fill-mode nil) ; No special "%" "#" etc filling. (woman-string-alist woman-string-alist) (woman-fill-column woman-fill-column) woman-negative-vertical-space) --=-=-= Content-Type: text/plain In GNU Emacs 24.2.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-10 on biber, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10707000 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.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/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 --=-=-=--