From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhihao Ding Subject: insert evaluation results in place Date: Wed, 28 Mar 2018 14:42:27 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c0df93cc937a205687a0433" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1CHh-0004ug-KO for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 10:42:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1CHg-00046j-RI for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 10:42:41 -0400 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:33630) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1CHg-00046E-Jl for emacs-orgmode@gnu.org; Wed, 28 Mar 2018 10:42:40 -0400 Received: by mail-pf0-x22e.google.com with SMTP id f15so1056275pfn.0 for ; Wed, 28 Mar 2018 07:42:40 -0700 (PDT) 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" --94eb2c0df93cc937a205687a0433 Content-Type: text/plain; charset="UTF-8" Hi there, I was wondering if anyone could share an example for referencing the results of a source code block in place. For example, a source code block could be defined as below #+HEADER: n_value #+HEADER: :results value #+HEADER: :noweb yes #+BEGIN_SRC R n_value=10 n_value #+END_SRC and I want to insert the result value after evaluation into a paragraph of text. I currently evaluate the source code block first, then copy the stuff under "#+RESULTS:" to the target location. I want to make it in one go, especially when the output is just a single number. Thank you, Zhihao --94eb2c0df93cc937a205687a0433 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi there,=C2=A0

I was wonder= ing if anyone could share an example for referencing the results of a sourc= e code block in place.=C2=A0

For example, a source= code block could be defined as below

=C2=A0 = #+HEADER: n_value
=C2=A0 #+HEADER: :results value
=C2= =A0 #+HEADER: :noweb yes
=C2=A0 #+BEGIN_SRC R
=C2=A0 = =C2=A0 n_value=3D10
=C2=A0 =C2=A0 n_value
=C2=A0 #+END_= SRC

and I want to insert the result value af= ter evaluation into a paragraph of text.

I current= ly evaluate the source code block first, then copy the stuff under "#+= RESULTS:" to the target location. I want to make it in one go, especia= lly when the output is just a single number.=C2=A0

Thank you,

Zhihao=C2=A0

--94eb2c0df93cc937a205687a0433--