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 20:13:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

>> Lastly hitting the `s' key opens another buffer in another
>> window (at least for me) and (also at least for me), at
>> surprising locations in my frame.  I have a UHD monitor and,
>> at least the way I configured it, emacs opens up to 4
>> windows, the help buffer and the source buffer not
>> necessarily adjunct.  All 4 windows can carry 92 lines, so
>> there is plenty of room below the text in the help buffer to
>> show more info.
>
> If you fit the window showing *Help* to its buffer, there is no room
> left.

It would be nice to make it fit to N lines in height, and C columns in width,
i.e. to make it fit to certain size.

>     .  Where to pop up the location of the source and how to get rid of
> it is a question we currently discuss in Bug#9054 and Bug#36767.

There are so many discussions here so I wasn't following those. I really don't
know what you have discussed there. I come to this from my own needs.

>                                                                   If and
> when we reach a consensus there, we can add an option to immediately
> display the source in the *Help* buffer or a window right below it (IIRC
> a C source wouldn't be always available though).

This shouldn't be by any mean in collision what you are saying here. What you
describe, as I understand it, is to display source on-demand, in help buffer,
which would be very nice too. What I have done is to display by global
switch. It would be still useful to have on-demand display when global switch is
off, and it would be trivial to re-build the patch to include that. I can
rebuild and send new one. I have found a bug and I need to rebuild-it anyway. I
can also refactor it and add an interactive function that can be boudn to a key
to display only sources in help buffer. And if global switch is on, and sources
are requested, it can function as a "narrow" button, i.e. fit only symbol source
to the help buffer. Would that be interesting?

Honestly, I dislike to display both help and entire source, because there is a
duplication of the doc string. I was always disturbed by this duplication in
helpful too. So I have experimented to display only the body of the function,
but I don't think that looked very nice either. There is a bug repport I did
about 'narrow-to-defun', and the help-mode.el I posted there, shows C sources
narrowed only to it's function body. 



reply via email to

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