GNU bug report logs - #60587
30.0.50; Info pages are lacking links from symbol names to the symbol's help documentation

Previous Next

Package: emacs;

Reported by: "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de>

Date: Thu, 5 Jan 2023 23:48:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Full log


Message #148 received at 60587 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de>
Cc: Juri Linkov <juri <at> jurta.org>, Eli Zaretskii <eliz <at> gnu.org>,
 "60587 <at> debbugs.gnu.org" <60587 <at> debbugs.gnu.org>,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#60587: Patch for adding links to symbols' help documentation
Date: Tue, 14 Feb 2023 15:56:37 -0500
> +(define-minor-mode info-links-to-help-mode
> +  "The mode creates buttons on symbols linking to their documentation string.
> +It shows their documentation in a *Help* buffers (in another
> +window) when typing <RET> or clicking `mouse-2' on the buttons.
> +These can be followed, as the regular Info manual references,
> +with \\[Info-next-reference] and \\[Info-prev-reference].
> +
> +For details about which symbols are considered and the linking
> +process itself please see the function `info-make-links-to-help'."
> +  :init-value nil
> +  :lighter " Hlp"
> +  :group 'info
> +  :version "30.1"
> +  ;;(if (eq major-mode 'Info-mode)
> +  (if info-links-to-help-mode
> +      (progn
> +        (if (eq major-mode 'Info-mode)
> +            ;; we need this under Info-mode because of the narrowed
> +            ;; Info file
> +            (add-hook 'Info-selection-hook 'info-make-links-to-help))
> +        (info-make-links-to-help))      ;for the current buffer

The above `define-minor-mode` still defines a buffer-local minor mode
whereas the above `add-hook` is still global and hence affects all buffers.
This is a recipe for inconsistent behavior.

> +;; Activate the mode for all Info buffers
> +(add-hook 'Info-mode-hook 'info-links-to-help-mode)

Better add a call to `info-links-to-help-mode` directly inside
`Info-mode`.


        Stefan





This bug report was last modified 2 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.