* eldoc errors in elisp
@ 2023-04-22 15:33 T.V Raman
2023-04-22 16:20 ` João Távora
0 siblings, 1 reply; 11+ messages in thread
From: T.V Raman @ 2023-04-22 15:33 UTC (permalink / raw)
To: emacs-devel
I keep seeing
eldoc error: (void-variable eldoc--doc-buffer-docs)
in the Messages buffer when working in .el files, not clear when or
how these errors get thrown
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-22 15:33 eldoc errors in elisp T.V Raman
@ 2023-04-22 16:20 ` João Távora
2023-04-22 16:37 ` T.V Raman
0 siblings, 1 reply; 11+ messages in thread
From: João Távora @ 2023-04-22 16:20 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
Hi, Raman
Can you describe a way to reproduce this problem? Either here or in a bug
report.
João
On Sat, Apr 22, 2023, 16:34 T.V Raman <raman@google.com> wrote:
> I keep seeing
> eldoc error: (void-variable eldoc--doc-buffer-docs)
> in the Messages buffer when working in .el files, not clear when or
> how these errors get thrown
>
> --
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> ♉ Id: kg:/m/0285kf1 🦮
>
> --
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> ♉ Id: kg:/m/0285kf1 🦮
>
>
[-- Attachment #2: Type: text/html, Size: 977 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-22 16:20 ` João Távora
@ 2023-04-22 16:37 ` T.V Raman
2023-04-22 17:45 ` João Távora
0 siblings, 1 reply; 11+ messages in thread
From: T.V Raman @ 2023-04-22 16:37 UTC (permalink / raw)
To: João Távora; +Cc: emacs-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 388 bytes --]
Hi, Apologies -- the error stemmed from some of my own code in emacspeak
which was refering to that variable which appears to have now
disappeared. I need to study the code in the updated eldoc to have
emacspeak work cleanly with the newer eldoc:-) Apologies for the noise
--
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1 0Ü8
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-22 16:37 ` T.V Raman
@ 2023-04-22 17:45 ` João Távora
2023-04-22 18:13 ` T.V Raman via Emacspeak
0 siblings, 1 reply; 11+ messages in thread
From: João Távora @ 2023-04-22 17:45 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
On Sat, Apr 22, 2023, 17:37 T.V Raman <raman@google.com> wrote:
> Hi, Apologies -- the error stemmed from some of my own code in emacspeak
> which was refering to that variable which appears to have now
> disappeared. I need to study the code in the updated eldoc to have
> emacspeak work cleanly with the newer eldoc:-) Apologies for the nois.
Let me know if I can help. That variable was an internal implementation
detail, so it went away and was replaced by something better. I can maybe
help you understand how to use ElDoc's public API to achieve your goals.
Just guessing but maybe what you want is a "speaking" member of
eldoc-display-functions. Have a read of its docstring.
João
[-- Attachment #2: Type: text/html, Size: 1268 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-22 17:45 ` João Távora
@ 2023-04-22 18:13 ` T.V Raman via Emacspeak
2023-04-22 21:25 ` João Távora
0 siblings, 1 reply; 11+ messages in thread
From: T.V Raman via Emacspeak @ 2023-04-22 18:13 UTC (permalink / raw)
To: joaotavora; +Cc: raman, emacs-devel, emacspeak
(Copying emacspeak list so it gets archived and found later)
Thanks for the offer to help, I'll take you up on it, see below.
Your guess is correct.
There are two goals for Emacspeak visavis Eldoc
1. If eldoc auto triggers a message, and if emacspeak were to speak it
in every case, it gets annoying fast and you cant do what you're
doing.
The advantage with visually showing the message is that the eye can
choose to ignore it; the ear cannot ignore something
spoken. Emacspeak tries to somewhat ameliorate this by speaking
notifications just on one ear, but it's still too much in the case
of eldoc.
2. Complementary requirement; you want to hear that message because
it does have helpful info; so you want it spoken "on demand".
Solution:
Emacspeak produces a very short auditory icon to
indicate that eldoc is available at point as you move through
the code; the experienced user can then hit a key and here it.
Here is the implementation; it's pretty short, and you might be
able to advice me (no defadvice pun intended)
See function emacspeak-speak-eldoc
at https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-advice.el#L801
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
_______________________________________________
Emacspeak mailing list -- emacspeak@emacspeak.org
To unsubscribe send an email to emacspeak-leave@emacspeak.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-22 18:13 ` T.V Raman via Emacspeak
@ 2023-04-22 21:25 ` João Távora
2023-04-23 2:43 ` T.V Raman via Emacspeak
0 siblings, 1 reply; 11+ messages in thread
From: João Távora @ 2023-04-22 21:25 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel, emacspeak
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
Alright, i had a look and it should be easy to fix.
I'll do that later.
I have a feeling we already had this conversation about an year ago. Your
code is fine for the most part, but you must rewrite it to use the
arguments passed to it instead of consulting internal implementation
details.
João
On Sat, Apr 22, 2023, 19:13 T.V Raman <raman@google.com> wrote:
>
> (Copying emacspeak list so it gets archived and found later)
>
> Thanks for the offer to help, I'll take you up on it, see below.
>
> Your guess is correct.
>
> There are two goals for Emacspeak visavis Eldoc
>
> 1. If eldoc auto triggers a message, and if emacspeak were to speak it
> in every case, it gets annoying fast and you cant do what you're
> doing.
>
> The advantage with visually showing the message is that the eye can
> choose to ignore it; the ear cannot ignore something
> spoken. Emacspeak tries to somewhat ameliorate this by speaking
> notifications just on one ear, but it's still too much in the case
> of eldoc.
>
> 2. Complementary requirement; you want to hear that message because
> it does have helpful info; so you want it spoken "on demand".
>
> Solution:
>
> Emacspeak produces a very short auditory icon to
> indicate that eldoc is available at point as you move through
> the code; the experienced user can then hit a key and here it.
>
> Here is the implementation; it's pretty short, and you might be
> able to advice me (no defadvice pun intended)
> See function emacspeak-speak-eldoc
> at
> https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-advice.el#L801
>
> --
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> ♉ Id: kg:/m/0285kf1 🦮
>
> --
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> ♉ Id: kg:/m/0285kf1 🦮
>
[-- Attachment #2: Type: text/html, Size: 2616 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-22 21:25 ` João Távora
@ 2023-04-23 2:43 ` T.V Raman via Emacspeak
2023-04-23 10:28 ` João Távora
0 siblings, 1 reply; 11+ messages in thread
From: T.V Raman via Emacspeak @ 2023-04-23 2:43 UTC (permalink / raw)
To: joaotavora; +Cc: raman, emacs-devel, emacspeak
Awesome, will rewrite once I hear back.
One constraint -- I'd like to keep backwrd compatibility with Emacs 28
since Emacs 29 is not yet ready for release.
I myself run Emacs from Git@Head
João Távora writes:
> Alright, i had a look and it should be easy to fix.
>
> I'll do that later.
>
> I have a feeling we already had this conversation about an year ago. Your
> code is fine for the most part, but you must rewrite it to use the
> arguments passed to it instead of consulting internal implementation
> details.
>
> João
>
> On Sat, Apr 22, 2023, 19:13 T.V Raman <raman@google.com> wrote:
>
> >
> > (Copying emacspeak list so it gets archived and found later)
> >
> > Thanks for the offer to help, I'll take you up on it, see below.
> >
> > Your guess is correct.
> >
> > There are two goals for Emacspeak visavis Eldoc
> >
> > 1. If eldoc auto triggers a message, and if emacspeak were to speak it
> > in every case, it gets annoying fast and you cant do what you're
> > doing.
> >
> > The advantage with visually showing the message is that the eye can
> > choose to ignore it; the ear cannot ignore something
> > spoken. Emacspeak tries to somewhat ameliorate this by speaking
> > notifications just on one ear, but it's still too much in the case
> > of eldoc.
> >
> > 2. Complementary requirement; you want to hear that message because
> > it does have helpful info; so you want it spoken "on demand".
> >
> > Solution:
> >
> > Emacspeak produces a very short auditory icon to
> > indicate that eldoc is available at point as you move through
> > the code; the experienced user can then hit a key and here it.
> >
> > Here is the implementation; it's pretty short, and you might be
> > able to advice me (no defadvice pun intended)
> > See function emacspeak-speak-eldoc
> > at
> > https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-advice.el#L801
> >
> > --
> >
> > Thanks,
> >
> > --Raman(I Search, I Find, I Misplace, I Research)
> > ♉ Id: kg:/m/0285kf1 🦮
> >
> > --
> >
> > Thanks,
> >
> > --Raman(I Search, I Find, I Misplace, I Research)
> > ♉ Id: kg:/m/0285kf1 🦮
> >
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
_______________________________________________
Emacspeak mailing list -- emacspeak@emacspeak.org
To unsubscribe send an email to emacspeak-leave@emacspeak.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-23 2:43 ` T.V Raman via Emacspeak
@ 2023-04-23 10:28 ` João Távora
2023-04-23 12:14 ` João Távora
2023-04-23 14:26 ` T.V Raman via Emacspeak
0 siblings, 2 replies; 11+ messages in thread
From: João Távora @ 2023-04-23 10:28 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel, emacspeak
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
On Sun, Apr 23, 2023, 03:43 T.V Raman <raman@google.com> wrote:
> Awesome, will rewrite once I hear back.
>
> One constraint -- I'd like to keep backwrd compatibility with Emacs 28
> since Emacs 29 is not yet ready for release.
>
> I myself run Emacs from Git@Head
>
Yes. All three versions will work consistently if you apply the technique
of using the arguments passed to your custom member of the
eldoc-display-functions hook instead of consulting the internal variable.
IOW the latest refactoring in ElDoc was done in a backward-compatible way.
João
>
[-- Attachment #2: Type: text/html, Size: 1156 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-23 10:28 ` João Távora
@ 2023-04-23 12:14 ` João Távora
2023-04-23 14:26 ` T.V Raman via Emacspeak
1 sibling, 0 replies; 11+ messages in thread
From: João Távora @ 2023-04-23 12:14 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel, emacspeak
On Sun, Apr 23, 2023 at 11:28 AM João Távora <joaotavora@gmail.com> wrote:
>
> On Sun, Apr 23, 2023, 03:43 T.V Raman <raman@google.com> wrote:
>>
>> Awesome, will rewrite once I hear back.
OK Raman, try this 100% guaranteed untested version:
(defvar emacspeak--last-docs nil
"Last docs considered in `emacspeak-speak-eldoc'.")
(defun emacspeak-speak-eldoc (docs interactive)
"Speak eldoc. Intended for `eldoc-display-functions'."
(with-current-buffer (get-buffer-create " *emacspeak-eldoc*")
(erase-buffer)
(insert (mapconcat #'car docs "\n"))
(unless (equal docs emacspeak--last-docs)
(emacspeak-auditory-icon 'doc))
(when interactive (dtk-speak (buffer-string))))
(setq emacspeak--last-docs docs))
The main difference to your version is that it doesn't rely on
eldoc-display-in-doc-buffer being also a member of
`eldoc-display-functions'. Not only is this more future-proof
it also means that that other eminently visual display could,
if you so wanted, be completely discarded in favor or the auditory
one (if you or the user so wishes).
João
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-23 10:28 ` João Távora
2023-04-23 12:14 ` João Távora
@ 2023-04-23 14:26 ` T.V Raman via Emacspeak
2023-04-23 14:35 ` João Távora
1 sibling, 1 reply; 11+ messages in thread
From: T.V Raman via Emacspeak @ 2023-04-23 14:26 UTC (permalink / raw)
To: joaotavora; +Cc: raman, emacs-devel, emacspeak
SG. Can I expect a patch from you, or do I go read up on the new
implementation -- am missing context that I'll need to refresh first
before I can follow your tip, and a patch would save me time as I get
ready to make the next public release of Emacspeak.
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
_______________________________________________
Emacspeak mailing list -- emacspeak@emacspeak.org
To unsubscribe send an email to emacspeak-leave@emacspeak.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eldoc errors in elisp
2023-04-23 14:26 ` T.V Raman via Emacspeak
@ 2023-04-23 14:35 ` João Távora
0 siblings, 0 replies; 11+ messages in thread
From: João Távora @ 2023-04-23 14:35 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel, emacspeak
On Sun, Apr 23, 2023 at 3:26 PM T.V Raman <raman@google.com> wrote:
>
> SG. Can I expect a patch from you, or do I go read up on the new
> implementation -- am missing context that I'll need to refresh first
> before I can follow your tip, and a patch would save me time as I get
> ready to make the next public release of Emacspeak.
Our messages crossed. My idea should be closed to what's needed,
but I haven't tested it (I don't have time to try Emacspeak now).
João
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-04-23 14:35 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-22 15:33 eldoc errors in elisp T.V Raman
2023-04-22 16:20 ` João Távora
2023-04-22 16:37 ` T.V Raman
2023-04-22 17:45 ` João Távora
2023-04-22 18:13 ` T.V Raman via Emacspeak
2023-04-22 21:25 ` João Távora
2023-04-23 2:43 ` T.V Raman via Emacspeak
2023-04-23 10:28 ` João Távora
2023-04-23 12:14 ` João Távora
2023-04-23 14:26 ` T.V Raman via Emacspeak
2023-04-23 14:35 ` João Távora
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.