* org-eldoc and shell
@ 2016-10-15 15:03 Fabrice Popineau
2016-10-18 11:47 ` Aaron Ecay
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Popineau @ 2016-10-15 15:03 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
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
<s TAB shell
runs into error every time.
Regards,
Fabrice
[-- Attachment #2: Type: text/html, Size: 1450 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-eldoc and shell
2016-10-15 15:03 org-eldoc and shell Fabrice Popineau
@ 2016-10-18 11:47 ` Aaron Ecay
2016-10-18 19:02 ` Fabrice Popineau
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Ecay @ 2016-10-18 11:47 UTC (permalink / raw)
To: Fabrice Popineau, emacs-orgmode@gnu.org
Hi Fabrice,
shell-mode is a shell emulation mode – what you get when you type M-x
shell. You should use sh (or bash, as applicable) in the header line of
your src blocks.
--
Aaron Ecay
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-eldoc and shell
2016-10-18 11:47 ` Aaron Ecay
@ 2016-10-18 19:02 ` Fabrice Popineau
0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Popineau @ 2016-10-18 19:02 UTC (permalink / raw)
To: Fabrice Popineau, emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
2016-10-18 13:47 GMT+02:00 Aaron Ecay <aaronecay@gmail.com>:
> Hi Fabrice,
>
> shell-mode is a shell emulation mode – what you get when you type M-x
> shell.
But shell-mode is working and I get a cmd.exe prompt (because I'm using
Windows).
> You should use sh (or bash, as applicable) in the header line of
> your src blocks.
>
> Ok! I understand now the problem I have seen in debugging this.
And it seems to work ok with both sh and bash.
Thanks for your help.
Fabrice
[-- Attachment #2: Type: text/html, Size: 1074 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-18 19:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15 15:03 org-eldoc and shell Fabrice Popineau
2016-10-18 11:47 ` Aaron Ecay
2016-10-18 19:02 ` Fabrice Popineau
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).