unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 23647@debbugs.gnu.org
Subject: bug#23647: 25.1.50; In man pages, links on hyphenated words don't work
Date: Sun, 29 May 2016 17:42:13 +0300	[thread overview]
Message-ID: <83eg8lx6wq.fsf@gnu.org> (raw)
In-Reply-To: <87d1o52ntu.fsf@gmx.net> (message from Stephen Berman on Sun, 29 May 2016 11:52:29 +0200)

> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Sun, 29 May 2016 11:52:29 +0200
> 
> O. emacs -Q
> 1. Open a man page that has a link on a hyphenated word, e.g. on my
>    system: M-x man RET signal RET, put point on the word spanning lines
>    129-130, which is displayed as `sig-
>    nalfd(2)'.
> 2. Type RET (or click mouse-1 or mouse-2) on that link.
> => The error message "Can’t find the 2 sig-nalfd manpage" is displayed.
> 
> The following patch makes the link DTRT:
> 
> diff --git a/lisp/man.el b/lisp/man.el
> index 5acf90b..5d4cacc 100644
> --- a/lisp/man.el
> +++ b/lisp/man.el
> @@ -1430,8 +1430,14 @@ Man-bgproc-sentinel
>  			(quit-restore-window
>  			 (get-buffer-window (current-buffer) t) 'kill)
>  		      (kill-buffer (current-buffer)))
> -		    (message "Can't find the %s manpage"
> -			     (Man-page-from-arguments args)))
> +                    ;; Entries hyphenated due to the window width
> +                    ;; won't be found in the man database, so remove
> +                    ;; the hyphenation and look again.
> +		    (if (string-match "-" args)

Is it only the ASCII hyphen/minus, or could there be other characters
(e.g., if Groff/troff are invoked with some exotic -Tfoo switch)?

> This is a long-standing bug (presumably since commit
> 162a12b1d7b1e985a8810bad24d068c825286f56 of Sep 13 2007), but although
> the fix seems safe, I suppose it's too late for emacs-25.  So if there
> are no objections, should I commit it to master, or is it ok for the
> upcoming release?

Master, please.

Thanks.





  reply	other threads:[~2016-05-29 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29  9:52 bug#23647: 25.1.50; In man pages, links on hyphenated words don't work Stephen Berman
2016-05-29 14:42 ` Eli Zaretskii [this message]
2016-05-29 23:09   ` Stephen Berman
2016-05-30  0:22     ` Eli Zaretskii
2016-05-30 13:55       ` Stephen Berman
2016-06-04 15:35         ` Eli Zaretskii
2016-06-05 11:17           ` Stephen Berman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83eg8lx6wq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23647@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).