From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: How to call a source code block from another one Date: Wed, 8 Mar 2017 11:46:35 +0000 Message-ID: <87efy856uc.fsf@delle7240.chemeng.ucl.ac.uk> References: <1ed163077135431daf64f84c2bd6ac4b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clbUD-0002ah-Vt for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 08:18:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clbU9-0003Op-2S for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 08:18:37 -0500 Received: from mail-he1eur01on0116.outbound.protection.outlook.com ([104.47.0.116]:55526 helo=EUR01-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1clbU8-0003Ob-MT for emacs-orgmode@gnu.org; Wed, 08 Mar 2017 08:18:32 -0500 In-Reply-To: <1ed163077135431daf64f84c2bd6ac4b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Marcin Borkowski's message of "Wed, 8 Mar 2017 11:20:08 +0000") 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" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wednesday, 8 Mar 2017 at 11:20, Marcin Borkowski wrote: > Hi all, > > and sorry if this is trivial, but I didn't find it in the manual. > > Assume that I have a few source code blocks (in my case, in bash) and > I want to call them in sequence. Is it possible to write another, > "master" source code block which would then call those previous blocks? You could use noweb to include other code blocks in a master one. You reference other src blocks using <>. e.g. #+begin_src shell :noweb yes <> <> #+end_src where block1 and block2 are shell src blocks as well. HTH, eric =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-241-gc3d67b --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWL/vGwAKCRDIkZPY//z2 fT1xAJ4pBjaofJOX1nM1j8yA6Ma4NcyThACgjfmw2fhaEAK96uNrx7T8AB6HV24= =8gq0 -----END PGP SIGNATURE----- --=-=-=--