From: "numbchild@gmail.com" <numbchild@gmail.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: org-eldoc error on shell src blocks
Date: Sun, 4 Feb 2018 15:42:18 +0800 [thread overview]
Message-ID: <CAL1eYu+eEFv=QEf4_rOiUsoH5cAnhUqE2z+eL7FVN6pstmYZqQ@mail.gmail.com> (raw)
In-Reply-To: <CAL1eYuJSidbwwLQjpb_MhwoPp7r7vrz5d7QjLac94io8vCk62g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 7497 bytes --]
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, numbchild@gmail.com <numbchild@gmail.com>
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/
>
[-- Attachment #2: Type: text/html, Size: 9731 bytes --]
next prev parent reply other threads:[~2018-02-04 7:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 1:32 org-eldoc error on shell src blocks numbchild
2018-02-04 7:42 ` numbchild [this message]
2018-02-04 7:55 ` Nicolas Goaziou
2019-03-31 8:53 ` 甲斐常伸
2019-04-04 15:14 ` Takaaki Ishikawa
2019-04-07 7:18 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAL1eYu+eEFv=QEf4_rOiUsoH5cAnhUqE2z+eL7FVN6pstmYZqQ@mail.gmail.com' \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).