emacs-devel
[Top][All Lists]
Advanced

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

Re: Need help with eldoc:


From: João Távora
Subject: Re: Need help with eldoc:
Date: Fri, 25 Mar 2022 00:16:07 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"T.V Raman" <raman@google.com> writes:

>          So to cut to the chase; could you provide me a simple
>          mechanism that I could call from emacspeak (via a keybinding
>          bound to an interactive command I write) where that command
>          calls into the eldoc machinery and gets back the help that
>          eldoc displays?

Hello Raman,

Yes, I think I have the solution for you.  There is a new variable
called eldoc-display-functions as well.  My advice is that you attempt
to write a member function for it.  Call it, say
emacsspeak-speak-out-docs and then add it to eldoc-display-functions via
add-hook.

Your new function emacsspeak-speak-out-docs will then receive two
arguments: DOCS and INTERACTIVE. The first contains the pieces of
documentation that have been gathered by the
eldoc-documentation-functions (plural) and the second INTERACTIVE
argument says if the request to "display" documentation came directly
from the user or from ElDoc's automatic mechanisms (the timer that you
are keen on turning off).

The docstring has more details.

Once that is done you need only call M-x eldoc and your problem, as you
presented it, should  be solved.  And yes, it's fine to turn off
global-eldoc-mode.

Let me know if you need more help. 

João

PS: I guess it should be called eldoc-presentation-functions instead of
eldoc-display-functions since in this case it's not really "displaying"
anything, but presenting it with sound.  Also congratulations for
Emacsspeak!  I realize it's a very important project, and it's amazing
that someone like you is making Emacs work for the visually impaired.



reply via email to

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