From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] Tangle multiple sections source blocks into single file without #+source: ... Date: Fri, 28 May 2010 07:05:45 -0600 Message-ID: <87sk5c9nx2.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=39279 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHzG5-0007nZ-Ax for emacs-orgmode@gnu.org; Fri, 28 May 2010 09:05:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHzG4-0003sR-0Z for emacs-orgmode@gnu.org; Fri, 28 May 2010 09:05:53 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:57208) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHzG3-0003sC-Oz for emacs-orgmode@gnu.org; Fri, 28 May 2010 09:05:51 -0400 Received: by pxi12 with SMTP id 12so1188361pxi.0 for ; Fri, 28 May 2010 06:05:50 -0700 (PDT) In-Reply-To: (Rainer M. Krug's message of "Fri, 28 May 2010 08:34:52 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: emacs-orgmode Hi Rainer, The first option you suggested below should already be supported. For example the following org-mode text --8<---------------cut here---------------start------------->8--- * appending tangle :PROPERTIES: :tangle: appended.el :END: append all these block #+begin_src emacs-lisp (message "block %d" 1) #+end_src #+begin_src emacs-lisp (message "block %d" 2) #+end_src #+begin_src emacs-lisp (message "block %d" 3) #+end_src --8<---------------cut here---------------end--------------->8--- tangles all three blocks to the file append.el. Please try something analogous and let me know if it doesn't work. Best -- Eric Rainer M Krug writes: > Hi > > I am using org-babel to write a simulation model and the accompanying > documentation and it works as expected. But I have many source blocks which > I want to tangle into the same source file. At the moment, I am using > "#+source: BLOCKNAME" (see below). But it is easy to forget to add the block > name to the actual tangle block at the bottom. Is there a way of: > > 1) tangle all source blocks into the same file? As far as I am aware, a new > tangle to the same file name, overwrites the already existing file --- I > would like to append the new code block to the existing file. > > or > > 2) is there a keyboard shortcut, that I can add the name of the block to the > actual tangle block automatically, when the e.g. block name is selected? > > Thanks, > > Rainer > * Here I am doing this > #+source: Block1 > #+begin_src R > some code > #+end_src > > * Here I am doing that > #+source: Block2 > #+begin_src R > some code > #+end_src > > * Creation of Source.R > #+begin_src R :tangle source.R > <> > <> > #+end_src