From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [Babel] Blank line preceeds tangled data Date: Fri, 26 Aug 2011 11:17:41 +0200 Message-ID: References: <87ippl2cse.fsf@norang.ca> <5525.1314333321@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00163630fefd7c670c04ab6504bf Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwsXo-0006HS-Do for emacs-orgmode@gnu.org; Fri, 26 Aug 2011 05:17:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwsXn-0000kP-0J for emacs-orgmode@gnu.org; Fri, 26 Aug 2011 05:17:44 -0400 Received: from mail-qy0-f169.google.com ([209.85.216.169]:38075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwsXm-0000kG-UE for emacs-orgmode@gnu.org; Fri, 26 Aug 2011 05:17:42 -0400 Received: by qyk27 with SMTP id 27so187921qyk.0 for ; Fri, 26 Aug 2011 02:17:42 -0700 (PDT) In-Reply-To: <5525.1314333321@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Bernt Hansen , emacs-orgmode@gnu.org --00163630fefd7c670c04ab6504bf Content-Type: text/plain; charset=ISO-8859-1 On Fri, Aug 26, 2011 at 6:35 AM, Nick Dokos wrote: > Bernt Hansen wrote: > > > Hi, > > > > When I tangle some file such as > > > > #+begin_src sh :tangle x.sh > > #!/bin/sh > > echo done > > #+end_src > > > > I get the following output which includes a blank line up front. > > > > ,----[ x.sh ] > > | > > | #!/bin/sh > > | echo done > > `---- > > > > Doesn't this break the shebang line on unix? I don't think the leading > > blank line should be in the tangled output. > > > > Not sure why it's there (I'm sure Eric S. will enlighten us) > but you can get rid of it with :padline no. > and there is also the :shebang parameter to specify the shebang, so #+begin_src sh :tangle x.sh :shebang #!bin/sh :padline no echo done #+end_src will give you the expected file x.sh. No idea why it is not enabled in your config. Cheers, Rainer > > Nick > > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --00163630fefd7c670c04ab6504bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Aug 26, 2011 at 6:35 AM, Nick Do= kos <nicholas= .dokos@hp.com> wrote:
Bernt Hansen <bernt@norang.ca> wrote:

> Hi,
>
> When I tangle some file such as
>
> #+begin_src sh :tangle x.sh
> =A0 #!/bin/sh
> =A0 echo done
> #+end_src
>
> I get the following output which includes a blank line up front.
>
> ,----[ x.sh ]
> |
> | #!/bin/sh
> | echo done
> `----
>
> Doesn't this break the shebang line on unix? =A0I don't think = the leading
> blank line should be in the tangled output.
>

Not sure why it's there (I'm sure Eric S. will enlighte= n us)
but you can get rid of it with :padline no.

=
and there is also the :shebang parameter to specify the shebang, so


#+begin_src sh :tangle x.sh :she= bang #!bin/sh :padline no
=A0echo done
#+end_src

will g= ive you the expected file x.sh. No idea why it is not enabled in your confi= g.

Cheers,

Rainer
=A0

Nick




--
Raine= r M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT)= , Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology Stellenbosch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9= 53 10 27 44
Cell: =A0 =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 = =A0 =A0 +33 - (0)9 58 10 27 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 2= 2 44

email: =A0 =A0 =A0Rainer@krugs.de

Skype: =A0 =A0 =A0RMkrug

--00163630fefd7c670c04ab6504bf--