From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [babel] Executing sh-code
Date: Thu, 03 Dec 2009 10:27:02 +0100 [thread overview]
Message-ID: <871vjc2ys9.fsf@mundaneum.com> (raw)
In-Reply-To: m2k4x5xhaq.fsf@gmail.com
Hi Eric,
"Eric Schulte" wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> "Eric Schulte" wrote:
>>> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>>>>
>>>> What's the impact of specifying "sh" or "bash" for the snippet?
>>>
>>> While "sh" blocks should work "bash" blocks will not be recognized. In
>>> org-babel "sh" doesn't explicitly mean the "sh" command, but rather means
>>> 'run shell' which will default to whatever shell you have configured.
>>
>> I wonder if it wouldn't be beneficial to make such a feature explicit. I think
>> the right shell environment cannot be guessed at runtime. Am I right?
>
> Hmm, currently we just use the `shell' command which defaults to the user's
> defined shell. I would have to investigate as to how to explicitly specify a
> particular shell to run, but I certainly do see your point that there are
> times when an explicit shell environment would be desirable.
>
> I'll create a TODO to reflect this need.
OK. Thanks.
>> Let's imagine two use cases:
>>
>> 1. I only have zsh on my machine, and I'm writing a document with bash code
>> blocks. What if the user executing them is using zsh as his default shell?
I meant "I only have bash on my machine". But, whatever, you understood my
point.
>> 2. I have both bash and zsh installed on my machine. I want to write some code
>> blocks in bash, and other in zsh. How can I make the difference explicit?
>>
>> BTW, a "needed" feature is the executable flag for shell scripts. I found a
>> reference to it ("PROPOSED make tangled files executable? At least if using
>> shebang line") on http://orgmode.org/worg/org-contrib/babel/development.php.
>
> Yes, I agree that this should be implemented, patches are welcome :)
I can imagine. My skills are still maybe a bit low to be productive in that
area. But I really would like to help. Second problem is -- and that must be
the same for everybody (you included) -- a deep lack of time, with real work
for real clients to be done during day, and little daughter to be taken care
of for (almost all) the rest of the time.
That's not an excuse. If I get time, I'll try to...
> Thanks for the very useful feedback, hopefully we'll be able to make
> some progress in these areas soon.
For the time I can now spend on Org-mode, I am making a document that uses
(part of) all the power of Org-babel. My intention is to share my result to
all of you, when it gets finished. That way, maybe I'll get feedback and
improvements as well on it...
It will be helpful for both Org-babel'ers (as an example) and for others as
well, for automating the creation of reports about... sshhht. Will tell when
it's done.
The plan is to use the best of what you give to us, including tables, shell
scripts and R plots.
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2009-12-03 9:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 14:22 [babel] Executing sh-code Sébastien Vauban
2009-11-27 9:15 ` Sébastien Vauban
2009-11-27 10:46 ` Eric S Fraga
2009-11-27 10:00 ` Torsten Wagner
2009-11-27 10:43 ` Sébastien Vauban
2009-11-27 19:32 ` Eric Schulte
2009-11-27 19:46 ` Dan Davison
2009-11-29 21:03 ` Sébastien Vauban
2009-11-30 15:44 ` Eric Schulte
2009-11-30 16:02 ` Nick Dokos
2009-11-30 16:16 ` Eric Schulte
2009-12-01 8:37 ` Sébastien Vauban
2009-12-01 10:01 ` Sébastien Vauban
2009-12-02 19:09 ` Eric Schulte
2009-12-04 13:25 ` Sébastien Vauban
2009-12-04 14:09 ` Sébastien Vauban
2009-12-04 17:04 ` Eric Schulte
2009-12-07 1:10 ` Torsten Wagner
2009-12-07 9:59 ` Sébastien Vauban
2009-12-04 17:03 ` Eric Schulte
2009-12-02 14:55 ` Sébastien Vauban
2009-12-02 20:16 ` Eric Schulte
2009-12-03 9:27 ` Sébastien Vauban [this message]
2009-12-03 16:06 ` Eric Schulte
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=871vjc2ys9.fsf@mundaneum.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).