From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [e.fennema@tiscali.nl: Man reading problem] Date: Sun, 11 Nov 2007 00:57:12 +0200 Organization: JURTA Message-ID: <87ve89slvn.fsf@jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194738806 21850 80.91.229.12 (10 Nov 2007 23:53:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Nov 2007 23:53:26 +0000 (UTC) Cc: e.fennema@tiscali.nl, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 11 00:53:30 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ir08n-0003dt-AZ for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 00:53:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ir08b-00018J-Lp for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2007 18:53:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ir087-0000t3-KY for emacs-devel@gnu.org; Sat, 10 Nov 2007 18:52:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ir085-0000qx-Ve for emacs-devel@gnu.org; Sat, 10 Nov 2007 18:52:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ir085-0000qk-Rf for emacs-devel@gnu.org; Sat, 10 Nov 2007 18:52:45 -0500 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ir081-0003P1-QN; Sat, 10 Nov 2007 18:52:42 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1Ir07z-0006ks-EQ; Sun, 11 Nov 2007 01:52:39 +0200 In-Reply-To: (Richard Stallman's message of "Fri, 09 Nov 2007 22:00:07 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-Scanner-Signature: 33ca3efb02d57e4381ef3dfbedf9ea6a X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1761 [Nov 09 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 19 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) 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:82923 Archived-At: > Would someone please DTRT then ack? > > From: Enno Fennema > Subject: Man reading problem > To: bug-gnu-emacs@gnu.org > Date: Fri, 09 Nov 2007 18:01:14 +0100 > > I am using GNU Emacs 22.1.1 part of SuSE Linux 10.3 x86_64. I canot read > the complete man page for udev as the buffer ends after the line "The > following keys can get values assigned: > > A fragment of the udev.7 file is > ... > The following keys can get values assigned: > .PP > \fBNAME\fR > .RS 4 > ... > > Replacing \fBNAME\fR by almost anything eg. \fBNAMF\fR cures the problem > but obviously prints NAMF rather than NAME. > > The man page displays in full when invoked in a terminal with man. > > Looks like a bug but appreciate your view. Inside this manpage there is a "NAME" heading with leading spaces that splits it into two pages (the second page is available by `M-n'). But this splitting is wrong. This bug is caused by the regexp in `Man-first-heading-regexp' that allows leading spaces. This is strange given that `Man-heading-regexp' defines a heading without leading spaces. The patch below removes the leading spaces from `Man-first-heading-regexp' because the main regexp for headings `Man-heading-regexp' doesn't have them. BTW, I also noticed that `Man-heading-regexp' doesn't recognize heading with numbers (e.g. "X11 FORWARDING" in `man ssh'), so I also added "[0-9]" to `Man-heading-regexp': Index: lisp/man.el =================================================================== RCS file: /sources/emacs/emacs/lisp/man.el,v retrieving revision 1.172 diff -c -r1.172 man.el *** lisp/man.el 13 Sep 2007 08:04:38 -0000 1.172 --- lisp/man.el 10 Nov 2007 22:56:48 -0000 *************** *** 264,277 **** "(\\(" Man-section-regexp "\\))\\).*\\1")) "Regular expression describing the heading of a page.") ! (defvar Man-heading-regexp "^\\([A-Z][A-Z /-]+\\)$" "Regular expression describing a manpage heading entry.") (defvar Man-see-also-regexp "SEE ALSO" "Regular expression for SEE ALSO heading (or your equivalent). This regexp should not start with a `^' character.") ! (defvar Man-first-heading-regexp "^[ \t]*NAME$\\|^[ \t]*No manual entry fo.*$" "Regular expression describing first heading on a manpage. This regular expression should start with a `^' character.") --- 264,277 ---- "(\\(" Man-section-regexp "\\))\\).*\\1")) "Regular expression describing the heading of a page.") ! (defvar Man-heading-regexp "^\\([A-Z][A-Z0-9 /-]+\\)$" "Regular expression describing a manpage heading entry.") (defvar Man-see-also-regexp "SEE ALSO" "Regular expression for SEE ALSO heading (or your equivalent). This regexp should not start with a `^' character.") ! (defvar Man-first-heading-regexp "^NAME$\\|^[ \t]*No manual entry fo.*$" "Regular expression describing first heading on a manpage. This regular expression should start with a `^' character.") -- Juri Linkov http://www.jurta.org/emacs/