emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch proposal: display symbol source code in help buffers


From: Arthur Miller
Subject: Re: Patch proposal: display symbol source code in help buffers
Date: Mon, 20 Sep 2021 17:11:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Date: Sun, 19 Sep 2021 21:50:35 +0200
>> 
>> Here is my second proposal to bring built-in help on par with external
>> offerings.
>
> Thanks.  Like Lars, I wonder why this is needed, given that we already
> have a way to show the sources by a command invoked from the *Help*
> buffer.  Can you tell how this feature makes a difference wrt what we
> have already?

I just answered to I think Lars or Stefan's answer to Lars, where I elaborate a
bit more why is it useful, if you can peek there, it would be nice so I dont'
need to re-write everything. Short summary:

- people new to Emacs are maybe not so inclined to look at the code, having code
  auto displayed makes at least me more inclined to actually look at the sources
  so, I think it has some educational purpose
- I don't always want to deep dive into the source, sometimes I just glimpse
  over to confirm my (mis)understanding :).
- no extra action needed to take to see the source (switch to buffer, hit 's)
- sometimes the source is just a wrapper, so I will need to perform a search in
  the source file, here I can actually hit C-h f on the symbol in help buffer
  and opened that function directly
- people are used to Helpful
- it is on a defcustom, nil by default, so having it as an opt-in does not cost
  much 

> And a minor nit:
>
>> * lisp/help-mode.el ('help-mode-inline-source'): New option.
>> ('help--fetch-c-src'): New function.
>> ('help--fetch-lisp-src'): New function.
>> ('help--symbol-source'): New function.
>> ('help-make-xrefs): Check for 'help-mode-inline-source' and
>> call 'help--symbol-source' to perform insertion when possible.
>
> We don't quote symbols inside the parentheses, only in the
> descriptions that follow the colon, as you did in the last entry.

Aha, yes yes, thanks, I'll remember that for the next time.



reply via email to

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