emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Would you say this information window is well desig


From: Drew Adams
Subject: RE: [External] : Re: Would you say this information window is well designed?
Date: Tue, 23 Feb 2021 05:34:09 +0000

> >> I think linking to the manual (as much as practically possible) from
> >> *Help* is a good idea.  However, `info-lookup-symbol' (the innards
> >> of which we basically have to call) is a bit on the slow side.
> >
> > I don't find it slow.  And it can be invoked only
> > when a user clicks (or uses RET) on a link.
> 
> But wouldn't that mean that the link is shown unconditionally?

Option `help-cross-reference-manuals' controls the manuals to search, as well 
as when to search them (on click or before creating the link).  If it's nil 
then no link is created.  Code could bind it to nil conditionally, if that's 
wanted.

> That's what happens with "helpful.el", and it doesn't make for the best
> experience when the function is not in any manual.  It would be better
> to not show a link in that case.

Whether to search beforehand, in which case you won't produce a link if there 
are no matches, or only when a user clicks the link, is controlled by the 
option (see above).

But depending on what kind of searching is done, searching beforehand, to be 
sure not to create a link if no match, can take time.

Here's the doc string of the option:

,----
| help-cross-reference-manuals is a variable defined in `help-fns+.el'.
| 
| Its value is (("emacs" "elisp"))
| 
| Documentation:
| Manuals to search, for a `*Help*' buffer link to the manuals.
| The default value is (("emacs" "elisp")).  Clicking the
| cross-reference link in `*Help*' uses `info-lookup-symbol' to take you
| directly to the relevant doc in the Emacs or Elisp manual.  This is
| very quick.
| 
| Any other value means that clicking the link searches the indexes of
| the specified manuals and then opens an Info Index buffer with links
| to the relevant manuals.  This can take a while, and if there are no
| matches then the `*info*' buffer shown is empty.  The advantage of
| this approach is that you can get to a hit in more than one manual.
| 
| The option value is a cons: (MANUALS . SEARCH-FIRST).
| 
|  MANUALS is the list of manuals to search, or the symbol `all', to
|   search all.  If `nil' then do not create a cross-reference link.
| 
|  SEARCH-FIRST is a Boolean value.  If MANUALS specifies other than
|  just the Emacs and Elisp manuals (both) then:
| 
|   * `nil' SEARCH-FIRST means create a cross-reference link
|     immediately, whether or not there are actually any matches.
| 
|   * Non-`nil' SEARCH-FIRST means search the indexes, and create a link
|     only if there are matches.  The indexes are thus searched before
|     populating buffer `*Help*', which takes time.  You probably do not
|     want to use this possibility.
| 
| You can customize this variable.
| 
| For more information see the manuals.
`----

reply via email to

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