From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: running a source code by name Date: Mon, 28 May 2018 16:25:29 +0000 Message-ID: References: <87h8mrq25l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNKxr-0005oV-Ow for emacs-orgmode@gnu.org; Mon, 28 May 2018 12:25:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNKxo-0008L3-CX for emacs-orgmode@gnu.org; Mon, 28 May 2018 12:25:43 -0400 Received: from iport-acv1-out.ucsd.edu ([132.239.0.176]:18210) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNKxn-0008IY-Nu for emacs-orgmode@gnu.org; Mon, 28 May 2018 12:25:40 -0400 In-Reply-To: <87h8mrq25l.fsf@gmail.com> Content-Language: en-US Content-ID: <777D31F3892F63408B87A2C7CB0C2243@AD.UCSD.EDU> 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: Eric S Fraga Cc: "Julian M. Burgos" , emacs-orgmode > On May 28, 2018, at 7:35 AM, Eric S Fraga wrote: >=20 > On Monday, 28 May 2018 at 11:13, Julian M. Burgos wrote: >> Dear list, >>=20 >> I have an org file with an R source code block. I want to have a second >> code block with an elisp call to run that first code. Something like th= is >>=20 >>=20 >> #+begin_src emacs-lisp :results silent :tangle no >>=20 >> ... Some elisp code to run the "myRcode" block. >=20 > Something along the lines of: >=20 > (org-babel-goto-named-src-block "myRcode") > (org-babel-execute-src-block) >=20 > should do the job? Maybe wrap it in=20 (save-excursion ... )=20 or use=20 (org-sbe "myRcode") or (org-babel-ref-resolve "myRcode")=20 which both can also pass :var args. HTH, Chuck