emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [babel] how to pass data to gnuplot from another block
Date: Fri, 13 Dec 2013 14:32:45 -0500	[thread overview]
Message-ID: <87zjo4y2aq.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: 878uvoad3s.fsf@gmail.com

Eric Schulte <schulte.eric@gmail.com> writes:

>> How about the following resolution?  We rename ob-sh.el to ob-shell.el.
>> New "shell" code blocks could use the value of the
>> `org-babel-sh-command' environment variable.  Then sh, bash, zsh, csh,
>> ash, dash (am I missing any other common ones) use the specific shell
>> specified.
> The attached patches make this change and continue to pass the entire
> test suite.  The problem being that with ob-sh, no longer present many
> users may have to change their configuration and possible the value of
> their local.mk file.  One solution there is to add a dummy ob-sh.el with
> a deprecation message for some transition time.  Thoughts?

Since I'm the de facto instigator of the original change in the default,
let me add my 2 cents. I'm fine with this change (or without it). I'd be
fine with changing the org-babel-sh-command setting in my config and
leaving the default alone.

And I sympathize with Greg's wish for portability in general, although
imo it's not particularly important in this case (ducking and donning
my asbestos underwear here).

I write short scripts in org files to document some process: I can't
remember anything any longer, so putting the details in a file is the
only way for me to figure out what I did six months (or even two days)
ago (finding the file again two days hence is another matter...) In most
cases, what I put in there is some sequence of commands, which will be
interpreted correctly no matter which shell is used.  If I have anything
more complicated (non-trivial control flow, non-trivial i/o redirection,
etc etc), I put it in a script in ~/bin and invoke that in the source
code block. I may not be typical here of course, but that's why I think
that portability is not particularly important in this case - so leave
the default at sh and be done with it.

But when I tried and failed to run Eric's script in the original email,
I had to do a little digging to figure out what went wrong and how to
fix it (I don't remember running across org-babel-sh-command before
this). So I asked the question about sh and the rest is history. I
probably should have made the observation that org-babel-sh-command had
to be modified to run the code block (which was plainly true) and left
the question (which could be interpreted in various ways) out. OTOH,
there is now this discussion and presumably the end result will be
better than what we started with.


PS. I haven't tried out the patch but I plan to do so over the weekend.

  reply	other threads:[~2013-12-13 19:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22  9:57 [babel] how to pass data to gnuplot from another block Eric S Fraga
2013-11-22 15:00 ` Eric Schulte
2013-11-22 17:27   ` Nick Dokos
2013-11-23 16:15     ` Eric Schulte
2013-12-13 15:23       ` Greg Troxel
2013-12-13 15:30         ` Eric Schulte
2013-12-13 15:48           ` Greg Troxel
2013-12-13 16:20             ` Eric Schulte
2013-12-13 17:13               ` Eric Schulte
2013-12-13 19:32                 ` Nick Dokos [this message]
2013-12-13 22:40                 ` Achim Gratz
2013-12-13 23:18                 ` Eric Schulte
2013-12-14 10:21                   ` Achim Gratz
2013-12-13 18:38               ` Greg Troxel
2013-12-13 19:08                 ` Sebastien Vauban
2013-12-13 16:32           ` Achim Gratz
2013-12-05  7:35   ` Eric S Fraga
2013-12-05 18:29     ` Eric Schulte
2013-12-05 19:59       ` Eric S Fraga
2013-12-06  2:06         ` Eric Schulte
2013-12-06 11:59           ` Eric S Fraga

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:

  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=87zjo4y2aq.fsf@alphaville.bos.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).