[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Org-mode shell SRC block under Windows
From: |
H. Dieter Wilhelm |
Subject: |
Re: Org-mode shell SRC block under Windows |
Date: |
Fri, 04 Feb 2022 14:15:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "H. Dieter Wilhelm" <dieter@duenenhof-wilhelm.de>
>> Date: Thu, 03 Feb 2022 21:37:25 +0100
>>
>> Hello
>>
>> I'd like to use an MSYS or MingW shell rather than the default shell
>> (com) for
>>
>> #+begin_src sh
>> echo $SHELL
>> #+end_src
>
> See explicit-shell-file-name (assuming that Org heeds that variable).
> But beware: futzing with that variable might get you in trouble
> elsewhere!
Yeah it seems so. That was the first idea I tried and it bit hard my
LaTeX exporting from org-mode. :-(
But I think it should be possible to specify a different shell only for
certain source blocks. Please consider the customisation variable
org-babel-shell-names => ("sh" "bash" "zsh" "fish" "csh" "ash" "dash"
"ksh" "mksh" "posh")
it is possible to modify (amend?) the list of shells but I just can't
find where and how to "define" such a new "shell".
By the way
#+begin_src shell
echo $0
#+end_src
seems to call MS com but
#+begin_src sh
echo $0
#+end_src
an MSYS2 shell /usr/bin/sh...
> In general, I'd say people who publish such blocks that assume a Posix
> shell are to blame, not your Emacs setup. I find such blocks
> frequently posted without a lot of thought, just because it "WFM".
Probably, I don't want to publish the blocks. They are intended as a
mixture of documentation for myself and automated scripting for building
Emacs.
Thank you for your interest
Dieter
--
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany