emacs-devel
[Top][All Lists]
Advanced

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

Re: Question on set-window-margins


From: Yuan Fu
Subject: Re: Question on set-window-margins
Date: Thu, 4 Jan 2024 16:25:26 -0800


> On Jan 4, 2024, at 4:52 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: John Yates <john@yates-sheets.org>
>> Date: Thu, 4 Jan 2024 07:29:00 -0500
>> Cc: nicolas.rougier@inria.fr, casouri@gmail.com, emacs-devel@gnu.org
>> 
>> On Wed, Jan 3, 2024 at 11:49 AM Eli Zaretskii <eliz@gnu.org> wrote:
>>> 
>>> We do that when there are too many details to have them in the doc
>>> string.  Otherwise, there's no need for a link because typing 'i' in
>>> the *Help* buffer will show the corresponding documentation in the
>>> manual.
>> 
>> A visual link has the virtue that it makes immediately clear case
>> holds.
> 
> It is infeasible to maintain such a link in a doc string of every
> symbol which is described in the manual(s), and unreasonable to expect
> us to add a link to each doc string of such symbols.  There are too
> many of them, and keeping the links up-to-date given the changes in
> the manuals is a lot of work.  So we do that judiciously, where we
> think it's needed; a judgment call.

Helpful.el automatically inserts a button that links to the manual entry if it 
can find the symbol in the manual. It’s probably not perfect, but I frequently 
found it to be, well, helpful ;-)

The test function is defined as

(defun helpful--in-manual-p (sym)
  "Return non-nil if SYM is in an Info manual."
  (let ((completions
         (cl-letf (((symbol-function #'message)
                    (lambda (_format-string &rest _args))))
           (info-lookup->completions 'symbol 'emacs-lisp-mode))))
    (-when-let (buf (get-buffer " temp-info-look"))
      (kill-buffer buf))
    (or (assoc sym completions)
        (assoc-string sym completions))))

Yuan


reply via email to

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