2016-07-06 22:41 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
Hello,

Fabrice Popineau <fabrice.popineau@gmail.com> writes:

> Am I alone to see this recently:
>
> insert an src python block with <s Tab python
> moving inside the src block
> and then some timer function breaking with:
>
> Debugger entered--Lisp error: (wrong-type-argument symbolp #[128 "\300\301
> \"\206 ... [eldoc-documentation-function apply default-value] 4 "
> (fn &rest ARGS)"] nil] 4 nil])
>   fboundp(#[128 "\300\301...[apply python-eldoc-function #[128
> "\301\302\300!^B\"\207" [eldoc-documentation-function apply default-value]
> 4 "\n\n(fn &rest ARGS)"] nil] 4 nil])
>   org-eldoc-documentation-function()
>   eldoc-print-current-symbol-info()
> ...
> timer-event-handler([t 0 0 500000 nil #[0 "... [eldoc-mode
> global-eldoc-mode eldoc-documentation-function (nil ignore)
> eldoc-print-current-symbol-info] 2] nil idle 0])
>
> This is with the latest emacs-25 "soon to be released" and the latest Org
> mode.
>
> Any help appreciated.

Could you send a backtrace with non byte-compiled code?


Hi Nicolas,

The problem is that the byte code comes from Python mode.
I solved the problem with this:

$ diff -uw contrib/lisp/org-eldoc.el contrib/lisp/org-eldoc.el
--- contrib/lisp/org-eldoc.el   2016-02-29 11:13:22.330099500 +0100
+++ contrib/lisp/org-eldoc.el   2016-07-04 07:11:10.466144400 +0200
@@ -155,7 +155,8 @@
              (string= lang "golang")) (when (require 'go-eldoc nil t)
                                         (go-eldoc--documentation-function)))
            (t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang)))
-                (when (fboundp doc-fun) (funcall doc-fun))))))))
+                (when (or (and (symbolp doc-fun) (fboundp doc-fun))
+                         (functionp doc-fun)) (funcall doc-fun))))))))

 ;;;###autoload
 (defun org-eldoc-load ()



In python.el, one can find this around line 5129:

  (if (null eldoc-documentation-function)
      ;; Emacs<25
      (set (make-local-variable 'eldoc-documentation-function)
           #'python-eldoc-function)
    (add-function :before-until (local 'eldoc-documentation-function)
                  #'python-eldoc-function))

which stores byte code in eldoc-documentation-function, which makes
fboundp fail because the object is not a symbol. However it is a function.

Regards,

Fabrice