emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Man reading problem]


From: Juri Linkov
Subject: Re: address@hidden: Man reading problem]
Date: Sun, 11 Nov 2007 00:57:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> Would someone please DTRT then ack?
>
> From: Enno Fennema <address@hidden>
> Subject: Man reading problem
> To: address@hidden
> 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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]