* Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)]
@ 2020-08-13 18:27 No Wayman
2020-08-14 5:07 ` Kyle Meyer
2020-08-15 6:21 ` Kyle Meyer
0 siblings, 2 replies; 5+ messages in thread
From: No Wayman @ 2020-08-13 18:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
The patch to org-eldoc applied in b2b587387 still throws an error:
eldoc error: (void-function nil)
I was unable to step through this because (I think) eldoc causes
the debugger to close as soon as input is received. The error
occurs when `eldoc--invoke-strategy` attempts to funcall
eldoc-documentation-default.
The attached patch works for me, but I do not know if it is the
correct solution.
Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X
toolkit, cairo version 1.17.3, Xaw3d scroll bars)
of 2020-08-12
Package: Org mode version 9.3.7 (release_9.3.7-708-g5417e3 @
/home/n/.emacs.d/straight/build/org/)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-eldoc-documentation-function --]
[-- Type: text/x-patch, Size: 1330 bytes --]
From 45dfdedbce47aa72c9f7f9f146b422236e9b9e23 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Thu, 13 Aug 2020 14:20:05 -0400
Subject: [PATCH] org-eldoc: (org-eldoc-documentation-function): set
`eldoc-documentation-functions'
* contrib/lisp/org-eldoc.el (org-eldoc-documentation-function):
b2b587387 did not set eldoc-documentation-functions, resulting in
`eldoc--invoke-strategy' throwing a void-fucntion error.
---
contrib/lisp/org-eldoc.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index aa1dcb41b..ce0b7ddc2 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -138,7 +138,8 @@
(string= lang "emacs-lisp")
(string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function)
(elisp-eldoc-documentation-function)
- (let (eldoc-documentation-function)
+ (let ((eldoc-documentation-functions
+ '(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
(eldoc-print-current-symbol-info))))
((or
(string= lang "c") ;; http://github.com/nflath/c-eldoc
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)]
2020-08-13 18:27 Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)] No Wayman
@ 2020-08-14 5:07 ` Kyle Meyer
2020-08-15 6:21 ` Kyle Meyer
1 sibling, 0 replies; 5+ messages in thread
From: Kyle Meyer @ 2020-08-14 5:07 UTC (permalink / raw)
To: No Wayman; +Cc: emacs-orgmode
No Wayman writes:
> The patch to org-eldoc applied in b2b587387 still throws an error:
>
> eldoc error: (void-function nil)
>
> I was unable to step through this because (I think) eldoc causes
> the debugger to close as soon as input is received. The error
> occurs when `eldoc--invoke-strategy` attempts to funcall
> eldoc-documentation-default.
>
> The attached patch works for me, but I do not know if it is the
> correct solution.
Yeah, b2b587387 dealt with the compiler warnings, but indeed it looks
like there is at least [*] this remaining issue. Thanks for catching it
and for the patch.
I'm short on time tonight, but I'll take a closer look tomorrow.
[*] Perhaps org-eldoc-get-mode-local-documentation-function's use of
eldoc-documentation-function is also problematic?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)]
2020-08-13 18:27 Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)] No Wayman
2020-08-14 5:07 ` Kyle Meyer
@ 2020-08-15 6:21 ` Kyle Meyer
2020-08-15 15:20 ` No Wayman
1 sibling, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2020-08-15 6:21 UTC (permalink / raw)
To: No Wayman; +Cc: emacs-orgmode
No Wayman writes:
> Subject: [PATCH] org-eldoc: (org-eldoc-documentation-function): set
> `eldoc-documentation-functions'
>
> * contrib/lisp/org-eldoc.el (org-eldoc-documentation-function):
>
> b2b587387 did not set eldoc-documentation-functions, resulting in
> `eldoc--invoke-strategy' throwing a void-fucntion error.
I'll plan to drop the unconventional blank line in the changelog entry
and s/fucntion/function/ when applying.
> ---
> contrib/lisp/org-eldoc.el | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
> index aa1dcb41b..ce0b7ddc2 100644
> --- a/contrib/lisp/org-eldoc.el
> +++ b/contrib/lisp/org-eldoc.el
> @@ -138,7 +138,8 @@
> (string= lang "emacs-lisp")
> (string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function)
> (elisp-eldoc-documentation-function)
> - (let (eldoc-documentation-function)
> + (let ((eldoc-documentation-functions
> + '(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
> (eldoc-print-current-symbol-info))))
> ((or
> (string= lang "c") ;; http://github.com/nflath/c-eldoc
This works on my end testing with Emacs 26.3 and the Emacs master branch.
For example
#+begin_src elisp
(message "ok")
#+end_src
shows "message: (FORMAT-STRING &rest ARGS)" when point is positioned
after "message". I don't have Emacs 24 at hand, but the
eldoc-documentation-function let-binding you're dropping should be
retained for it, I think. Assuming it's fine with you, I'll squash this
into your patch.
diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index ce0b7ddc2..3b0999340 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -136,11 +136,16 @@ (defun org-eldoc-documentation-function (&rest _ignored)
(let ((lang (org-eldoc-get-src-lang)))
(cond ((or
(string= lang "emacs-lisp")
- (string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function)
- (elisp-eldoc-documentation-function)
- (let ((eldoc-documentation-functions
- '(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
- (eldoc-print-current-symbol-info))))
+ (string= lang "elisp"))
+ (cond ((boundp 'eldoc-documentation-functions) ; Emacs>=28
+ (let ((eldoc-documentation-functions
+ '(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
+ (eldoc-print-current-symbol-info)))
+ ((fboundp 'elisp-eldoc-documentation-function)
+ (elisp-eldoc-documentation-function))
+ (t ; Emacs<25
+ (let (eldoc-documentation-function)
+ (eldoc-print-current-symbol-info)))))
((or
(string= lang "c") ;; http://github.com/nflath/c-eldoc
(string= lang "C")) (when (require 'c-eldoc nil t)
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-15 17:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-13 18:27 Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)] No Wayman
2020-08-14 5:07 ` Kyle Meyer
2020-08-15 6:21 ` Kyle Meyer
2020-08-15 15:20 ` No Wayman
2020-08-15 17:19 ` Kyle Meyer
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.