From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [babel] Tangle multiple sections source blocks into single file without #+source: ... Date: Mon, 31 May 2010 09:00:54 +0200 Message-ID: References: <87sk5c9nx2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0582788848==" Return-path: Received: from [140.186.70.92] (port=37967 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIzCJ-0004hr-8b for emacs-orgmode@gnu.org; Mon, 31 May 2010 03:14:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIyzZ-0002RN-0A for emacs-orgmode@gnu.org; Mon, 31 May 2010 03:00:58 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:54463) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIyzY-0002RB-NO for emacs-orgmode@gnu.org; Mon, 31 May 2010 03:00:56 -0400 Received: by wwb24 with SMTP id 24so511981wwb.0 for ; Mon, 31 May 2010 00:00:55 -0700 (PDT) In-Reply-To: <87sk5c9nx2.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode --===============0582788848== Content-Type: multipart/alternative; boundary=0016e64696e8055ced0487de6bdb --0016e64696e8055ced0487de6bdb Content-Type: text/plain; charset=ISO-8859-1 On Fri, May 28, 2010 at 3:05 PM, Eric Schulte wrote: > Hi Rainer, > > The first option you suggested below should already be supported. For > example the following org-mode text > > Thanks Eric, this is working as expected. Cheers, Rainer > --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 > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax: +27 - (0)86 516 2782 Fax: +49 - (0)321 2125 2244 email: Rainer@krugs.de Skype: RMkrug Google: R.M.Krug@gmail.com --0016e64696e8055ced0487de6bdb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, May 28, 2010 at 3:05 PM, Eric Sc= hulte <schul= te.eric@gmail.com> wrote:
Hi Rainer,

The first option you suggested below should already be supported. =A0For example the following org-mode text


Thanks Eric,

this is working as expected.
<= br>Cheers,

Rainer
=A0
--8<---------------cut here---------------start------------->8---
* appending tangle
=A0 :PROPERTIES:
=A0 :tangle: =A0 appended.el
=A0 :END:
append all these block

#+begin_src emacs-lisp
=A0(message "block %d" 1)
#+end_src

#+begin_src emacs-lisp
=A0(message "block %d" 2)
#+end_src

#+begin_src emacs-lisp
=A0(message "block %d" 3)
#+end_src
--8<---------------cut here---------------end--------------->8---

tangles all three blocks to the file append.el. =A0Please try something
analogous and let me know if it doesn't work.

Best -- Eric



--
NEW GERMAN = FAX NUMBER!!!

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

Centre of Excellen= ce for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch UniversityMain Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:= =A0 =A0 =A0 =A0 =A0 +27 - (0)83 9479 042
Fax: =A0 =A0 =A0 =A0 =A0 =A0+2= 7 - (0)86 516 2782
Fax: =A0 =A0 =A0 =A0 =A0 =A0+49 - (0)321 2125 2244
email: =A0 =A0 =A0 = =A0 =A0
Rainer@krugs.de

Skype:= =A0 =A0 =A0 =A0 =A0RMkrug
Google: =A0 =A0 =A0 =A0 R.M.Krug@gmail.com

--0016e64696e8055ced0487de6bdb-- --===============0582788848== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0582788848==--