From: Daimrod <daimrod@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Extra empty line at the top of the page when tangling.
Date: Wed, 22 Oct 2014 08:26:59 +0200 [thread overview]
Message-ID: <878uk8k4b0.fsf@tanger.home> (raw)
In-Reply-To: <CAHyAE10fqnUZT7j0wrjoU9dCCd=r3VgAS=VPk5PH0-+1b1fBww@mail.gmail.com> (Ivanov Dmitry's message of "Wed, 22 Oct 2014 08:53:44 +0400")
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
Ivanov Dmitry <usr345@gmail.com> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
prev parent reply other threads:[~2014-10-22 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 4:53 Extra empty line at the top of the page when tangling Ivanov Dmitry
2014-10-22 6:26 ` Daimrod [this message]
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=878uk8k4b0.fsf@tanger.home \
--to=daimrod@gmail.com \
--cc=emacs-orgmode@gnu.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).