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#11552: 23.4; woman.el bold \e Date: Thu, 24 May 2012 11:32:54 +1000 Message-ID: <87y5oi4b3t.fsf@blah.blah> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1337823558 31626 80.91.229.3 (24 May 2012 01:39:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 May 2012 01:39:18 +0000 (UTC) To: 11552@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 24 03:39:16 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 1SXN1H-0004pC-BR for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2012 03:39:15 +0200 Original-Received: from localhost ([::1]:41361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXN1G-0008AE-Vi for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 May 2012 21:39:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXN1D-00089f-Vj for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:39:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXN1C-00075m-1f for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:39:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXN1B-00075h-Uu for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:39:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SXN21-0004n4-LT for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:40: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: Thu, 24 May 2012 01:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11552 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.133782356418361 (code B ref -1); Thu, 24 May 2012 01:40:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2012 01:39:24 +0000 Original-Received: from localhost ([127.0.0.1]:41206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SXN1Q-0004m6-8K for submit@debbugs.gnu.org; Wed, 23 May 2012 21:39:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46536) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SXN1O-0004lt-19 for submit@debbugs.gnu.org; Wed, 23 May 2012 21:39:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXN0R-0006x7-92 for submit@debbugs.gnu.org; Wed, 23 May 2012 21:38:24 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:50927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXN0R-0006x2-5i for submit@debbugs.gnu.org; Wed, 23 May 2012 21:38:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXN0P-00081O-9p for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:38:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXN0N-0006wJ-8V for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:38:20 -0400 Original-Received: from mailout1-11.pacific.net.au ([125.255.80.130]:48834 helo=mailout3-syd3.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXN0M-0006w5-Lp for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 21:38:19 -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 8E14F4F97E4 for ; Thu, 24 May 2012 11:38:12 +1000 (EST) Original-Received: from blah.blah (unknown [203.26.175.125]) by mailproxy4-syd3.pacific.net.au (Postfix) with ESMTP id 57D0B2C075 for ; Thu, 24 May 2012 11:38:11 +1000 (EST) Original-Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1SXMv8-0000at-UC for bug-gnu-emacs@gnu.org; Thu, 24 May 2012 11:32:54 +1000 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.4 (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:60328 Archived-At: --=-=-= With the esc-face.1 below, (woman-find-file "esc-face.1") produces bold \ backslash with the "\" not in bold, where I expected it would be (man-db+groff makes it bold). I think woman.el.esc-face.diff below could correct this. 2012-05-24 Kevin Ryde * woman.el (woman-decode-region): Replace escaped-escapes using `subst-char-in-region' so bold or underline on \e is preserved. I struck this in some perl pod2man output. It uses \e for backslashes in "verbatim" output paragraphs (bits of sample code usually). Those parts are in ".ft CW" font, which comes out of woman.el as woman-unknown face (which is red). But the face wasn't on the backslashes. --=-=-= Content-Disposition: inline; filename=esc-face.1 .TH FOO 1 .SH NAME .B bold \e backslash --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=woman.el.esc-face.diff --- woman.el.orig 2012-05-19 12:08:35.000000000 +1000 +++ woman.el 2012-05-24 07:09:48.000000000 +1000 @@ -2394,17 +2394,20 @@ (woman-negative-vertical-space from)) (if woman-preserve-ascii - ;; Re-instate escaped escapes to just `\' and unpaddable - ;; spaces to just `space', without inheriting any text - ;; properties. This is not necessary, UNLESS the buffer is to - ;; be saved as ASCII. + ;; Re-instate escaped escapes to just `\' and unpaddable spaces to + ;; just `space'. This is not necessary for display since there's + ;; display table entries for the escaped chars, but it is necessary + ;; if the buffer might be saved as ASCII. + ;; + ;; `subst-char-in-region' preserves text properties on the + ;; characters, which is necessary for bold, underline, etc on \e. + ;; There's usually no face on spaces, but if there is then it's good + ;; to keep that too. (progn - (goto-char from) - (while (search-forward woman-escaped-escape-string nil t) - (delete-char -1) (insert ?\\)) - (goto-char from) - (while (search-forward woman-unpadded-space-string nil t) - (delete-char -1) (insert ?\ )))) + (subst-char-in-region from (point-max) + woman-escaped-escape-char ?\\) + (subst-char-in-region from (point-max) + woman-unpadded-space-char ?\ ))) ;; Must return the new end of file if used in format-alist. (point-max))) --=-=-= In GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-08 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/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'' --=-=-=--