emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-eldoc error on shell src blocks


From: address@hidden
Subject: Re: [O] org-eldoc error on shell src blocks
Date: Sun, 4 Feb 2018 15:42:18 +0800

After some dive in deeper

- [X] emacs minimal init test, confirmed issue in org-mode.
- [X] from the error log, seems `org-eldoc` try to call `(progn (funcall mode-func) ...`. This caused `shell-mode()`.
- [ ] check out `org-eldoc.el` source code, have not found any solution or options.

Hope some org-mode hacker can help to fix this issue?
And this might be a unit test in Org-mode testing?

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Fri, Feb 2, 2018 at 9:32 AM, address@hidden <address@hidden> wrote:
When I enable `eldoc-mode` in org-mode.
eldoc timer running when on `shell` src blocks like:

#+begin_src shell
  git log $rev..origin/emacs-25 -- lisp/org doc/misc/org.texi \
    etc/refcards/orgcard.tex etc/ORG-NEWS etc/org \
    etc/schema/od-manifest-schema-v1.2-os.rnc \
    etc/schema/od-schema-v1.2-os.rnc
#+end_src

I got the following error.

#+begin_example
Debugger entered--Lisp error: (wrong-type-argument processp nil)
  process-command(nil)
  shell-mode()
  funcall(shell-mode)
  (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache))
  (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) doc-func)
  (if (fboundp mode-func) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) doc-func))
  (if (eq 'empty cached-func) (if (fboundp mode-func) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) doc-func)) cached-func)
  (let ((cached-func (gethash lang org-eldoc-local-functions-cache 'empty)) (mode-func (intern-soft (format "%s-mode" lang))) doc-func) (if (eq 'empty cached-func) (if (fboundp mode-func) (progn (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (funcall mode-func) (setq doc-func (and eldoc-documentation-function (symbol-value 'eldoc-documentation-function))) (puthash lang doc-func org-eldoc-local-functions-cache)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) doc-func)) cached-func))
  org-eldoc-get-mode-local-documentation-function("shell")
  (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang))) (if (functionp doc-fun) (progn (funcall doc-fun))))
  (cond ((or (string= lang "emacs-lisp") (string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function) (elisp-eldoc-documentation-function) (let (eldoc-documentation-function) (eldoc-print-current-symbol-info)))) ((or (string= lang "c") (string= lang "C")) (if (require 'c-eldoc nil t) (progn (c-eldoc-print-current-symbol-info)))) ((string= lang "css") (if (require 'css-eldoc nil t) (progn (css-eldoc-function)))) ((string= lang "php") (if (require 'php-eldoc nil t) (progn (php-eldoc-function)))) ((or (string= lang "go") (string= lang "golang")) (if (require 'go-eldoc nil t) (progn (go-eldoc--documentation-function)))) (t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang))) (if (functionp doc-fun) (progn (funcall doc-fun))))))
  (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-function) (eldoc-print-current-symbol-info)))) ((or (string= lang "c") (string= lang "C")) (if (require 'c-eldoc nil t) (progn (c-eldoc-print-current-symbol-info)))) ((string= lang "css") (if (require 'css-eldoc nil t) (progn (css-eldoc-function)))) ((string= lang "php") (if (require 'php-eldoc nil t) (progn (php-eldoc-function)))) ((or (string= lang "go") (string= lang "golang")) (if (require 'go-eldoc nil t) (progn (go-eldoc--documentation-function)))) (t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang))) (if (functionp doc-fun) (progn (funcall doc-fun)))))))
  (or (org-eldoc-get-breadcrumb) (org-eldoc-get-src-header) (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-function) (eldoc-print-current-symbol-info)))) ((or (string= lang "c") (string= lang "C")) (if (require 'c-eldoc nil t) (progn (c-eldoc-print-current-symbol-info)))) ((string= lang "css") (if (require 'css-eldoc nil t) (progn (css-eldoc-function)))) ((string= lang "php") (if (require 'php-eldoc nil t) (progn (php-eldoc-function)))) ((or (string= lang "go") (string= lang "golang")) (if (require 'go-eldoc nil t) (progn (go-eldoc--documentation-function)))) (t (let ((doc-fun (org-eldoc-get-mode-local-documentation-function lang))) (if (functionp doc-fun) (progn (funcall doc-fun))))))))
  org-eldoc-documentation-function()
  eldoc-print-current-symbol-info()
  #f(compiled-function () #<bytecode 0x27fd5d>)()
  apply(#f(compiled-function () #<bytecode 0x27fd5d>) nil)
  timer-event-handler([t 0 0 500000 nil #f(compiled-function () #<bytecode 0x27fd5d>) nil idle 0])
#+end_example


[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


reply via email to

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