all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11591: 23.4; woman.el .nf blank \&
@ 2012-05-30 23:03 Kevin Ryde
  2012-07-07 10:10 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Ryde @ 2012-05-30 23:03 UTC (permalink / raw)
  To: 11591

[-- Attachment #1: Type: text/plain, Size: 746 bytes --]

With the nf-blank.1 below,

    (woman-find-file "nf-blank.1")

produces

          Unfilled line 1.
          Unfilled line 2.

where I expected there would be a blank line in between, corresponding
to the \& line.

I think woman.el.nf-blank.diff below could correct this.

2012-05-29  Kevin Ryde  <user42@zip.com.au>

	* woman.el (woman2-process-escapes): For .nf preserve newline
	following \&.  Fixes blank lines in perl pod2man "verbatim" blocks.


Perl pod2man makes such \& lines for blank lines in "verbatim" blocks
(usually sample code etc).  Dunno if it really needs to do that.  Maybe
it distinguishes line spacing from paragraph spacing in troff or
something.  In any case for woman I don't think a \& on the line should
remove it.



[-- Attachment #2: nf-blank.1 --]
[-- Type: text/plain, Size: 67 bytes --]

.TH FOO 1
.SH DESCRIPTION
.nf
Unfilled line 1.
\&
Unfilled line 2.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: woman.el.nf-blank.diff --]
[-- Type: text/x-diff, Size: 660 bytes --]

diff -u /so/woman/woman-24.el /so/woman/woman.el
--- /so/woman/woman-24.el	2012-05-18 14:59:04.000000000 +1000
+++ /so/woman/woman.el	2012-05-29 10:41:25.000000000 +1000
@@ -3931,7 +3931,9 @@
     (while (re-search-forward "\\\\[&|^]" to t)
       (woman-delete-match 0)
       ;; If on a line by itself, consume newline as well (Bug#3651).
-      (and (eq (char-before (match-beginning 0)) ?\n)
+      ;; But not in a .nf region, preserve all newlines in that case.
+      (and (not woman-nofill)
+	   (eq (char-before (match-beginning 0)) ?\n)
 	   (eq (char-after (match-beginning 0)) ?\n)
 	   (delete-char 1)))
 

Diff finished.  Tue May 29 10:41:30 2012

[-- Attachment #4: Type: text/plain, Size: 949 bytes --]



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''



-- 
Even the white bits were black.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#11591: 23.4; woman.el .nf blank \&
  2012-05-30 23:03 bug#11591: 23.4; woman.el .nf blank \& Kevin Ryde
@ 2012-07-07 10:10 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2012-07-07 10:10 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 11591

Kevin Ryde <user42@zip.com.au> writes:

> With the nf-blank.1 below,
>
>     (woman-find-file "nf-blank.1")
>
> produces
>
>           Unfilled line 1.
>           Unfilled line 2.
>
> where I expected there would be a blank line in between, corresponding
> to the \& line.
>
> I think woman.el.nf-blank.diff below could correct this.

Committed, thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-07 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 23:03 bug#11591: 23.4; woman.el .nf blank \& Kevin Ryde
2012-07-07 10:10 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.