From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [christopher.ian.moore@gmail.com: Re: woman loops forever if man page doesn't end with newline] Date: Wed, 25 Oct 2006 03:15:00 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1161760526 30209 80.91.229.2 (25 Oct 2006 07:15:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2006 07:15:26 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 25 09:15:21 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gccys-000629-Pd for ged-emacs-devel@m.gmane.org; Wed, 25 Oct 2006 09:15:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gccyr-0003yJ-Iw for ged-emacs-devel@m.gmane.org; Wed, 25 Oct 2006 03:15:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gccyd-0003y4-2V for emacs-devel@gnu.org; Wed, 25 Oct 2006 03:15:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gccyc-0003xs-Bl for emacs-devel@gnu.org; Wed, 25 Oct 2006 03:15:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gccyc-0003xp-5h for emacs-devel@gnu.org; Wed, 25 Oct 2006 03:15:02 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gccyc-0007tQ-1X for emacs-devel@gnu.org; Wed, 25 Oct 2006 03:15:02 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Gccya-0001o0-TH; Wed, 25 Oct 2006 03:15:01 -0400 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61144 Archived-At: Would someone please install this? ------- Start of forwarded message ------- From: Chris Moore To: emacs-pretest-bug In-Reply-To: <1160749781.3111.1.camel@chrislap.madeupdomain.com> Content-Type: multipart/mixed; boundary="=-XeAiEm9IJt54bEXuslkK" Date: Tue, 24 Oct 2006 15:22:19 +0200 Mime-Version: 1.0 Subject: Re: woman loops forever if man page doesn't end with newline X-Spam-Status: No, score=0.1 required=5.0 tests=MIME_SUSPECT_NAME,RCVD_BY_IP autolearn=failed version=3.0.4 - --=-XeAiEm9IJt54bEXuslkK Content-Type: text/plain Content-Transfer-Encoding: 7bit Here's a patch to fix this. It adds a newline to the end of the man page whether or not there's one there already. Chris. On Fri, 2006-10-13 at 16:29 +0200, Chris Moore wrote: > If a man page doesn't have a terminating newline, then M-x woman RET > RET will go into an infinite loop. > > For example, this 2 line man page: > > ------------------------------------------------------------------------ > .SH OVERVIEW > Oops > ------------------------------------------------------------------------ > > will trigger the bug, if the newline after "Oops" is omitted. > > When testing this, use fundamental-mode to create the file because > nroff mode will add the final newline automatically when the file is > saved. > > I discovered the bug when trying to view Debian unstable's 'svn.1' man > page. > > The package is here: > > http://ftp.debian.org/debian/pool/main/s/subversion/subversion_1.4.0-4_i386.deb > > and the man page is here: > /usr/share/man/man1/svn.1.gz > > > I'll raise a separate bug against the subversion package in the Debian > BTS, but woman shouldn't hang in this case anyway. > > > > In GNU Emacs 22.0.50.168 (i686-pc-linux-gnu, GTK+ Version 2.8.20) > of 2006-10-12 on chrislap > X server distributor `The X.Org Foundation', version 11.0.70101000 > configured using `configure '--with-gtk' '--with-xpm' '--with-jpeg' > '--with-png' '--with-gif'' > > Important settings: > value of $LC_ALL: en_GB.UTF-8 > 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_GB.UTF-8 > locale-coding-system: utf-8 > default-enable-multibyte-characters: t > > Major mode: Fundamental > > Minor modes in effect: > show-paren-mode: t > display-time-mode: t > iswitchb-mode: t > dynamic-completion-mode: t > shell-dirtrack-mode: t > tooltip-mode: t > mouse-wheel-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > unify-8859-on-encoding-mode: t > utf-translate-cjk-mode: t > auto-compression-mode: t > column-number-mode: t > line-number-mode: t > transient-mark-mode: t > - --=-XeAiEm9IJt54bEXuslkK Content-Disposition: attachment; filename=woman.txt Content-Type: text/x-patch; name=woman.txt; charset=utf-8 Content-Transfer-Encoding: 7bit - --- old/woman.el 2006-10-24 15:17:50.000000000 +0200 +++ woman.el 2006-10-24 15:16:47.000000000 +0200 @@ -1727,7 +1727,10 @@ (auto-compression-mode 1)) (nth 1 (condition-case () - - (insert-file-contents filename nil) + (progn + (insert "\n") + (backward-char 1) + (insert-file-contents filename nil)) (file-error ;; Run find-file-not-found-hooks until one returns non-nil. ;; (run-hook-with-args-until-success 'find-file-not-found-hooks) - --=-XeAiEm9IJt54bEXuslkK Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug - --=-XeAiEm9IJt54bEXuslkK-- ------- End of forwarded message -------