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: martin rudalics
Subject: Re: Patch proposal: display symbol source code in help buffers
Date: Tue, 21 Sep 2021 18:52:10 +0200

>>> 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.
>>
>> Who would specify that "certain size"?
> User, of course, who else? We put some default size and a defcuctom for user 
to
> change, as always?

Do you mean "one size fits all"?  I'm afraid I don't understand what you
intend here.

> Let's
> have a face lift for built in help for 28. I am sure we could debate for years
> and always someone will like it differently. Let's have something that works.

That something will take its time to be written.  Certainly not before
Emacs 28 comes out.

> I  haven't read the other thread, but I have used help and why I think it is
> good, and some other have as well.

There are two threads and I think you should read them if you plan to
change anything in this area.

> Can you try what I send in yesterday, with soucre view toggle? I think it 
works
> quite nice (I did a misstake and went 1 row too far when deleting, but that's 
a
> trivial to fix).

Compiling it tells me

../../lisp/help-mode.el:530:22: Warning: the function
    ‘find-function-advised-original’ is not known to be defined.

so it should require 'find-func'.  A few remarks:

+(defcustom help-mode-inline-source nil
+  "Display inlined source code for SYMBOL in `help-mode' buffer.

What is SYMBOL here?

+  "Find C source code for a Lisp symbol in a `file'.
+
+sym is the symbol to find.
+type is the type as obtained by 'describe-*' functions.
+file is the source file to search in."

Arguments should be uppercase and not hyphenated.

+             (with-no-warnings (font-lock-fontify-buffer)))

Do you know how long it takes to fontify xdisp.c?  With a non-optimized
build, C-h v for 'scroll-minibuffer-conservatively' takes more than 10
seconds here.

Other than that I can only say that this is _one_ possible option for
showing the source of the code.  BTW, we should decide on a suitable
interface for 'help-toggle-source-view' probably using the button for
showing the code.

martin




reply via email to

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