From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: org-eldoc and shell Date: Sat, 15 Oct 2016 17:03:59 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113dfd5a403648053ee8a8fe Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvQVa-0006V8-OM for emacs-orgmode@gnu.org; Sat, 15 Oct 2016 11:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvQVY-0000Qm-S3 for emacs-orgmode@gnu.org; Sat, 15 Oct 2016 11:04:21 -0400 Received: from mail-ua0-x232.google.com ([2607:f8b0:400c:c08::232]:34466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvQVY-0000Qg-NK for emacs-orgmode@gnu.org; Sat, 15 Oct 2016 11:04:20 -0400 Received: by mail-ua0-x232.google.com with SMTP id m26so5885044uaa.1 for ; Sat, 15 Oct 2016 08:04:20 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" --001a113dfd5a403648053ee8a8fe Content-Type: text/plain; charset=UTF-8 Hi, In org-eldoc.el, org-eldoc-get-mode-local-documentation-function function, there is this code: (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)) Unfortunately, this code does not work for shell-mode. Especially, if you get a temp buffer and try to turn it into shell mode, you get an error because there is no associated process. Emacs 25.1 uses this in the shell-mode function to find which shell: (let ((shell (file-name-nondirectory (car (process-command (get-buffer-process (current-buffer)))))) but if there is no process, get-buffer-process returns nil and process-command fails. I am only reporting this because I am not sure what to do about it But surely it is a bit annoying that Hi,

In org-eldoc.el,=C2=A0org-eldoc-get= -mode-local-documentation-function function, there is this code:
=
(with-temp-buffer
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (funcall mode-func)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (setq doc-func (and eldoc-documentation-function
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (symbol-value 'eldoc-documentati= on-function)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (puthash= lang doc-func org-eldoc-local-functions-cache))

=
Unfortunately, this code does not work for shell-mode.
Espec= ially, if you get a temp buffer and try to turn it into shell mode,=C2=A0
you get an error because there is no associated process.

Emacs 25.1 uses this in the shell-mode function to find whi= ch shell:
(let ((shell (file-name-nondirectory (car
= =C2=A0 (process-command (get-buffer-process (current-buffer))))))
=C2=A0
but if there is no process, get-buffer-process = returns nil and process-command fails.

I am only r= eporting this because I am not sure what to do about it
But surel= y it is a bit annoying that=C2=A0
<s TAB shell
runs = into error every time.

Regards,

Fabrice

--001a113dfd5a403648053ee8a8fe--