all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: rms@gnu.org
Cc: e.fennema@tiscali.nl, emacs-devel@gnu.org
Subject: Re: [e.fennema@tiscali.nl: Man reading problem]
Date: Sun, 11 Nov 2007 00:57:12 +0200	[thread overview]
Message-ID: <87ve89slvn.fsf@jurta.org> (raw)
In-Reply-To: <E1IqgZr-0003YV-KX@fencepost.gnu.org> (Richard Stallman's message of "Fri, 09 Nov 2007 22:00:07 -0500")

> Would someone please DTRT then ack?
>
> From: Enno Fennema <e.fennema@tiscali.nl>
> 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/

  reply	other threads:[~2007-11-10 22:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-10  3:00 [e.fennema@tiscali.nl: Man reading problem] Richard Stallman
2007-11-10 22:57 ` Juri Linkov [this message]
2007-11-11 13:57   ` Stefan Monnier
2007-11-11 21:45     ` Juri Linkov
2007-11-11 19:33   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ve89slvn.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=e.fennema@tiscali.nl \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.