From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniele Pizzolli Subject: Re: babel result chain outdated/inconsistent using var Date: Thu, 07 Apr 2016 10:12:49 +0200 Message-ID: <87k2k9zzzzrg5a@me.localhost.invalid> References: <87k2kbzzzzrlna@me.localhost.invalid> <87zit6c2y6.fsf@nicolasgoaziou.fr> <877fgazzzzsw8d@me.localhost.invalid> <87inzu7d2l.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao5FK-0002AE-U3 for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 04:24:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ao5FH-0003EY-ND for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 04:24:58 -0400 Received: from slow1-d.mail.gandi.net ([217.70.178.86]:44362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao5FH-0003EH-Gl for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 04:24:55 -0400 In-Reply-To: <87inzu7d2l.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Wed, 06 Apr 2016 21:27:14 +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: Nicolas Goaziou Cc: Org-mode On Wed, Apr 06 2016, Nicolas Goaziou wrote: > 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. Hello, Oh, thanks Nicolas for the tip. But it does not work in a reliable manner. Calling `org-babel-execute-buffer' in the following snippet, raises: (error "Reference `pid-result' not found in this buffer") #+NAME: pid #+BEGIN_SRC shell :results value :cache no printf '%s' "${$}" #+END_SRC #+NAME: pid-result #+RESULTS: pid #+NAME: echo-pid #+BEGIN_SRC shell :var DATA=pid-result :results value printf '%s' "${DATA}" #+END_SRC #+RESULTS: echo-pid Using the C-c C-c on the blocks also does not work... unless you also do a C-c C-c on `#+NAME: pid-result' which is cumbersome if you have a chain of blocks and results. Do you think that this can be fixed easily? Thanks in advance, Daniele