[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Extra empty line at the top of the page when tangling.
From: |
Daimrod |
Subject: |
Re: [O] Extra empty line at the top of the page when tangling. |
Date: |
Wed, 22 Oct 2014 08:26:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Ivanov Dmitry <address@hidden> writes:
Hi,
> Code:
>
> #+BABEL: :cache yes :tangle yes :noweb yes
>
> #+NAME: top_block
> #+begin_src perl :tangle "test.pl" :noweb tangle
From (info "(org) padline"):
> 14.8.2.10 ‘:padline’
> ....................
>
> Control in insertion of padding lines around code block bodies in
> tangled code files. The default value is ‘yes’ which results in
> insertion of newlines before and after each tangled code block. The
> following arguments are accepted.
>
> • ‘yes’ Insert newlines before and after each code block body in
> tangled code files.
> • ‘no’ Do not insert any newline padding in tangled output.
You can use the following block declaration:
#+begin_src perl :tangle "test.pl" :noweb tangle :padline no
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> open(my $fh, "<", "test.txt")
> or die "cannot open < file name: $!";
> <<output-all>>
> close($fh);
> #+end_src
>
> #+NAME: output-all
> #+begin_src perl
> while (my $line = <$fh>) {
> print $line;
> }
> #+end_src
>
> Outputs a perl file, where the 1-st line is blank. What should I do to remove
> it?
--
Daimrod/Greg
signature.asc
Description: PGP signature