emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: [babel] how to pass data to gnuplot from another block
Date: Fri, 13 Dec 2013 23:40:13 +0100	[thread overview]
Message-ID: <87a9g4z86q.fsf@Rainer.invalid> (raw)
In-Reply-To: 878uvoad3s.fsf@gmail.com

Eric Schulte 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.

I've also seen ksh, mksh, posh (the latter specifically for POSIX
compatibility checks).  But trying to enumerate all possible shell names
is futile, especially when the same shell dialect can have different
names on different systems and you'll only find a handful of those on
each particular system installed.  Then there are those systems where at
least two different shells exist with the same name in different paths
and you'll get one or the other depending on which way your path is set

> 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?

I'm not sure this does the right thing (if that is even possible in this
case).  It looks overcomplicated to me, anyway.

There are two sides to a shell: the programming language / scripting
part and the interactive part.  Of those shells that are somewhat POSIX
compatible, the programming language part isn't all that much different
(at least no more than, say, different C dialects).  Even csh does the
right thing with a lot of POSIX stuff and you shouldn't really use it
for serious scripting anyway.  The interactive part shouldn't really
figure into Babel, even though the particular choice will introduce one
or the other quirk in certain areas of scripting if you're not careful.

Emacs' shell-mode recognizes that ambiguity: it looks up the bang line
to decide which dialect to chose and waits for a user decision if it
can't find one.  I'd have no problem if ob-sh did the same and simply
ran with whatever it can get away with (assuming close-enough-to-POSIX)
and only chose a specific shell when asked (via bang line or otherwise).

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:

  parent reply	other threads:[~2013-12-13 22:40 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
2013-12-13 22:40                 ` Achim Gratz [this message]
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=87a9g4z86q.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --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).