From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniele Pizzolli Subject: babel result chain outdated/inconsistent using var Date: Wed, 06 Apr 2016 14:01:45 +0200 Message-ID: <87k2kbzzzzrlna@me.localhost.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anm9k-0006fU-RT for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:01:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anm9h-0005gv-Kk for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:01:56 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:58257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anm9h-0005ed-En for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:01:53 -0400 Received: from mfilter43-d.gandi.net (mfilter43-d.gandi.net [217.70.178.174]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id D9BE641C0AA for ; Wed, 6 Apr 2016 14:01:51 +0200 (CEST) Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter43-d.gandi.net (mfilter43-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id g4JspxTWXl6k for ; Wed, 6 Apr 2016 14:01:49 +0200 (CEST) Received: from localhost.invalid (outusers6.fbk.eu [217.77.82.229]) (Authenticated sender: me@toel.it) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6C77A41C08D for ; Wed, 6 Apr 2016 14:01:48 +0200 (CEST) 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: Org-mode Hello, is possible to update the =E2=80=9C#+RESULTS: pid=E2=80=9D when the block = =E2=80=9C#+NAME: echo-pid=E2=80=9D is evaluated in the following snippet? This will lead to a consistent document generation with =E2=80=9CM-x org-babel-execute-buffer=E2=80=9D or by hitting =E2=80=9CC-c C-c=E2=80=9D o= n =E2=80=9C#+NAME: echo-pid=E2=80=9D. Using the cache does not make sense: the process is generating different output every time. The info at =E2=80=9CM-: (info "(org) Specific header arguments")=E2=80=9D = does not mention something useful. * Intro ** pid #+NAME: pid #+BEGIN_SRC shell :results value :cache no printf '%s' "${$}" #+END_SRC The following result is usually outdated/inconsistent! #+RESULTS: pid : 25272 ** echo pid #+NAME: echo-pid #+BEGIN_SRC shell :var DATA=3Dpid :results value printf '%s' "${DATA}" #+END_SRC #+RESULTS: echo-pid : 25273 The code block in pid is evaluated every time, but the results are used only to populate the pid variable and non for updating the results in the buffer: #+BEGIN_EXAMPLE executing Shell code block (pid)... Wrote /tmp/babel-4889iZN/ob-input-4889CyZ "25273" executing Shell code block (echo-pid)... Wrote /tmp/babel-4889iZN/ob-input-48892ay Code block evaluation complete. #+END_EXAMPLE This was tested with Org-mode version 8.3.4 release_8.3.4-705-g716e33. Thanks in advance for your suggestions, Daniele