emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* #+BEGIN_SRC sh C-c C-c in Windows
@ 2020-04-22 12:09 Neil Cherry
  2020-04-23  6:15 ` Robert Klein
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Cherry @ 2020-04-22 12:09 UTC (permalink / raw)
  To: Emacs-orgmode

I've searched for a resolution for this but haven't found one. I want to be able
to call a different command shell in Windows. What I keep seeing is that it can't
find /bin/sh

#+BEGIN_SRC sh :results output
set
#+END_SRC

I would prefer that I can change it to the bash shell in PortableGit.
Also I have no ability to add packages to the machine (other than emacs).
I don't have admin on this machine.

Thanks
-- 
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: #+BEGIN_SRC sh C-c C-c in Windows
  2020-04-22 12:09 #+BEGIN_SRC sh C-c C-c in Windows Neil Cherry
@ 2020-04-23  6:15 ` Robert Klein
  2020-04-23 13:46   ` Neil Cherry
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Klein @ 2020-04-23  6:15 UTC (permalink / raw)
  To: Neil Cherry; +Cc: Emacs-orgmode

Hi,

On Wed, 22 Apr 2020 08:09:39 -0400
Neil Cherry <ncherry@linuxha.com> wrote:

> I've searched for a resolution for this but haven't found one. I want
> to be able to call a different command shell in Windows. What I keep
> seeing is that it can't find /bin/sh
> 
> #+BEGIN_SRC sh :results output
> set
> #+END_SRC
> 
> I would prefer that I can change it to the bash shell in PortableGit.
> Also I have no ability to add packages to the machine (other than
> emacs). I don't have admin on this machine.
> 
> Thanks

use

#begin_src bash ...


Best regards
Robert


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: #+BEGIN_SRC sh C-c C-c in Windows
  2020-04-23  6:15 ` Robert Klein
@ 2020-04-23 13:46   ` Neil Cherry
  2020-04-26 16:10     ` Neil Cherry
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Cherry @ 2020-04-23 13:46 UTC (permalink / raw)
  To: Robert Klein; +Cc: Emacs-orgmode

On 4/23/20 2:15 AM, Robert Klein wrote:
> Hi,
> 
> On Wed, 22 Apr 2020 08:09:39 -0400
> Neil Cherry <ncherry@linuxha.com> wrote:
> 
>> I've searched for a resolution for this but haven't found one. I want
>> to be able to call a different command shell in Windows. What I keep
>> seeing is that it can't find /bin/sh
>>
>> #+BEGIN_SRC sh :results output
>> set
>> #+END_SRC
>>
>> I would prefer that I can change it to the bash shell in PortableGit.
>> Also I have no ability to add packages to the machine (other than
>> emacs). I don't have admin on this machine.
>>
>> Thanks
> 
> use
> 
> #begin_src bash ...

#+BEGIN_SRC sh bash :results value raw
  set
#+END_SRC

Hit C-c C-C in the block results in:

emacs returns /usr/bin/sh: sh: command not found

-- 
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: #+BEGIN_SRC sh C-c C-c in Windows
  2020-04-23 13:46   ` Neil Cherry
@ 2020-04-26 16:10     ` Neil Cherry
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Cherry @ 2020-04-26 16:10 UTC (permalink / raw)
  To: Robert Klein; +Cc: Emacs-orgmode

On 4/23/20 9:46 AM, Neil Cherry wrote:
> On 4/23/20 2:15 AM, Robert Klein wrote:
>> Hi,
>>
>> On Wed, 22 Apr 2020 08:09:39 -0400
>> Neil Cherry <ncherry@linuxha.com> wrote:
>>
>>> I've searched for a resolution for this but haven't found one. I want
>>> to be able to call a different command shell in Windows. What I keep
>>> seeing is that it can't find /bin/sh
>>>
>>> #+BEGIN_SRC sh :results output
>>> set
>>> #+END_SRC
>>>

Thanks to everyone who helped (Robert. Steven, Julius). Basically the Windows path
was munged and for some reason adding to the path (exec-path) didn't help. Anyway,
cleaned up the path and it is now working on both Windows (Home and Work PC).

#+BEGIN_SRC bash :shebang "#!/usr/bin/bash" :results output :wrap
    echo -e "#\n# Date: '$(date +%Y-%m-%d)'\n#"
#+END_SRC

#+RESULTS:
#+BEGIN_RESULTS
#
# Date: '2020-04-26'
#
#+END_RESULTS

-- 
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-26 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 12:09 #+BEGIN_SRC sh C-c C-c in Windows Neil Cherry
2020-04-23  6:15 ` Robert Klein
2020-04-23 13:46   ` Neil Cherry
2020-04-26 16:10     ` Neil Cherry

Code repositories for project(s) associated with this 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).