From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: change in calling remote code blocks? Date: Mon, 15 Jan 2018 16:08:26 -0800 Message-ID: References: <87r2qqybxp.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1148d714b059ef0562d987f7" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebEnm-0002FQ-Em for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 19:08:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebEnl-00029i-1p for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 19:08:30 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:39032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebEnk-00028L-MY for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 19:08:28 -0500 Received: by mail-wm0-x233.google.com with SMTP id i11so5091011wmf.4 for ; Mon, 15 Jan 2018 16:08:28 -0800 (PST) In-Reply-To: <87r2qqybxp.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --001a1148d714b059ef0562d987f7 Content-Type: text/plain; charset="UTF-8" I don't recall how I learned about that, I guess maybe in some library of babel documentation somewhere. I confirmed it does work in 8.2.10, e.g. just with emacs -Q. There are a few changes in org 9 to org-babel-lob-execute-maybe and org-babel-lob-get-info that seem to be the root cause of the change. Notably, org-babel-lob-get-info now returns nil where it used to return the "path" to the file and block. So, if I put this into an org file (progn (re-search-forward "call") (message "%s" (org-babel-lob-get-info))) ;<- execute here #+call: remote-call.org:test-block() These get returned In 8.2.10: "(remote-call.org:test-block() nil 0 nil)" In 9.1.6: "nil" I am not sure what all the differences are, but it seems to be where the change in behavior came from. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Mon, Jan 15, 2018 at 2:49 PM, Nicolas Goaziou wrote: > Hello, > > John Kitchin writes: > > > In org8 I used to be able to call remote code blocks ( > > http://kitchingroup.cheme.cmu.edu/blog/2016/02/09/Calling- > remote-code-blocks-in-org-mode/ > > ) > > > > with a syntax like: > > > > #+call: si.org:figure-1() :wrap html > > > > And C-c C-c on that line would call a code block named figure-1 in the > file > > si.org and insert the results. > > > > in org 9.1.6, this does nothing. Does anyone know if this got changed, > and > > if there is a new way to do that? > > This sounds like a bug. > > It does ring a bell. However, I couldn't find any reference to this > syntax or behaviour in the manual. Am I missing something? > > Regards, > > -- > Nicolas Goaziou > --001a1148d714b059ef0562d987f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't recall how I learned about that, I guess maybe= in some library of babel documentation somewhere. I confirmed it does work= in 8.2.10, e.g. just with emacs -Q.

There are a few cha= nges in org 9 to=C2=A0org-babel-lob-execute-maybe and=C2=A0org-babel-lob-ge= t-info that seem to be the root cause of the change. Notably,=C2=A0org-babe= l-lob-get-info now returns nil where it used to return the "path"= to the file and block.

So, if I put this into an = org file

(progn
=C2=A0(re-search-fo= rward "call")
=C2=A0(message "%s" (org-babel-= lob-get-info)))=C2=A0 =C2=A0;<- execute here

<= div>
#+call: remote-call.org:test-block()

<= /div>
These get returned

In 8.2.10:=C2=A0"= ;(remote-call.org:test-block() nil 0 nil)"
In 9.1.6: "n= il"

I am not sure what all the differences ar= e, but it seems to be where the change in behavior came from.

John

-----------------------------------
Professor John Kitchi= n=C2=A0
Doherty Hall A207F
Department of Chemical Engineering
Carn= egie Mellon University
Pittsburgh, PA 15213
412-268-7803


--001a1148d714b059ef0562d987f7--