Hello,
I encounted the same error and I found it happens because "org-eldoc.el" doesn't reflect a value of "org-src-lang-modes". When I redefine "org-eldoc-get-mode-local-documentation-function" to reflect a value of "org-src-lang-modes" as below, the error disappeared.
(defun org-eldoc-get-mode-local-documentation-function (lang)
"Check if LANG-mode sets eldoc-documentation-function and return its value."
(let ((cached-func (gethash lang org-eldoc-local-functions-cache 'empty))
(mode-func (org-src--get-lang-mode lang))
doc-func)
(if (eq 'empty cached-func)
(when (fboundp mode-func)
(with-temp-buffer
(funcall mode-func)
(setq doc-func (and eldoc-documentation-function
(symbol-value 'eldoc-documentation-function)))
(puthash lang doc-func org-eldoc-local-functions-cache))
doc-func)
cached-func)))
The practical change is a one line.
diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index 556b945..fca13c3 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -110,7 +110,7 @@
(defun org-eldoc-get-mode-local-documentation-function (lang)
"Check if LANG-mode sets eldoc-documentation-function and return its value."
(let ((cached-func (gethash lang org-eldoc-local-functions-cache 'empty))
- (mode-func (intern-soft (format "%s-mode" lang)))
+ (mode-func (org-src--get-lang-mode lang))
doc-func)
(if (eq 'empty cached-func)
(when (fboundp mode-func)
I confirmed this change works good on the following two environments.
- Emacs 26.1 on Windows 10
- (emacs-version) ; GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-05-29
- (org-version) ; Org mode version 9.2.2 (9.2.2-13-g0007df-elpaplus @ /home/kai2nenobu/.emacs.d/elpa/org-plus-contrib-20190318/)
- Emacs 26.1 on Ubuntu 18.04 on WSL (on above Windows 10)
- (emacs-version) ; GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-31
- (org-version) ; Org mode version 9.2.1 (9.2.1-8-g1b1797-elpaplus @ c:/Users/kai2nenobu/.emacs.d/elpa/org-plus-contrib-20190211/)
I'm ready to contribute this patch, but I don't know how to contribute to "org-eldoc.el". Please tell me how to do it.
Best Regards,