From mboxrd@z Thu Jan 1 00:00:00 1970 From: jenia.ivlev@gmail.com (jenia.ivlev) Subject: Re: babel, header arguments. Date: Fri, 21 Nov 2014 15:32:06 -0500 Message-ID: <87y4r4gurd.fsf@gmail.com> References: <8761ec2vsp.fsf@gmail.com> <86389emcxa.fsf@example.com> <87h9xsibxv.fsf@gmail.com> <87bno0iadl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrupz-0003G9-S0 for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 15:29:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xrupt-0001Kb-JZ for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 15:29:51 -0500 Received: from plane.gmane.org ([80.91.229.3]:60574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrupt-0001KR-Cc for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 15:29:45 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xrupr-0001OU-JH for emacs-orgmode@gnu.org; Fri, 21 Nov 2014 21:29:43 +0100 Received: from modemcable112.235-178-173.mc.videotron.ca ([173.178.235.112]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Nov 2014 21:29:43 +0100 Received: from jenia.ivlev by modemcable112.235-178-173.mc.videotron.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Nov 2014 21:29:43 +0100 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: emacs-orgmode@gnu.org jenia.ivlev@gmail.com (jenia.ivlev) writes: > tsd@tsdye.com (Thomas S. Dye) writes: > >> Aloha, >> >> jenia.ivlev@gmail.com (jenia.ivlev) writes: >> >>> Also, what if I want to import the actual function defintion into >>> another src block: >>> >>> #+begin_src scheme >>> (+ (my-plus 3 4) 1) >>> #+end_src >>> something here that import the previous function definitions >>> >>> Is that possible? >> >> Yes, see section 14.10 Noweb reference syntax in the manual. >> >> You'll have something that looks like this: >> >> #+header: :noweb yes >> #+begin_src scheme >> <> >> (+ (previous-function 3 4) 1) >> #+end_src >> >> hth, >> Tom > > What do you mean? <> should be replaced > with the actual function definition? But I use babel-mode so that I can > interlace code in a natural language document. I want these src blocks > to be separate. > > > Tom, thanks so so much. If someone is interested: #+name: my-plus #+begin_src scheme :noweb-ref my-plus (define my-plus (lambda (x y) (+ x y))) (my-plus 3 3) #+end_src #+RESULTS: my-plus : 6 #+name: my-plus2 #+header: :noweb yes #+begin_src scheme <> (define my-plus2 (lambda () (+ (my-plus 3 4) 1))) (my-plus2) #+end_src #+RESULTS: my-plus2 : 8