From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: babel result chain outdated/inconsistent using var Date: Wed, 06 Apr 2016 21:27:14 +0200 Message-ID: <87inzu7d2l.fsf@nicolasgoaziou.fr> References: <87k2kbzzzzrlna@me.localhost.invalid> <87zit6c2y6.fsf@nicolasgoaziou.fr> <877fgazzzzsw8d@me.localhost.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ant4g-0002Mv-NZ for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 15:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ant4c-0003Gc-IH for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 15:25:10 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:44810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ant4c-0003EQ-CU for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 15:25:06 -0400 In-Reply-To: <877fgazzzzsw8d@me.localhost.invalid> (Daniele Pizzolli's message of "Wed, 06 Apr 2016 15:27:46 +0200") 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: Daniele Pizzolli Cc: Org-mode Daniele Pizzolli writes: > Thanks Nicolas for the reply. Ok, but `org-babel-execute-buffer' > produces an inconsistent document right now. This is because you ask it to. See below. > Mmm, the same reasoning can be used for arguing about the current > behaviour: If I C-c C-c on a block, I expect only the code of the > block to be executed, not some other part of the document I am > editing. This behaviour will fix my issue. You are explicitly asking for a re-execution of a remote source block: :var DATA=pid If you are only interested in the results, you should name them, and use that instead, e.g. #+NAME: pid #+BEGIN_SRC shell :results value :cache no printf '%s' "${$}" #+END_SRC The following result is usually outdated/inconsistent! #+NAME: pid-result #+RESULTS: pid : 21867 #+NAME: echo-pid #+BEGIN_SRC shell :var DATA=pid-result :results value printf '%s' "${DATA}" #+END_SRC #+RESULTS: echo-pid : 21867 Regards,