From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: change in calling remote code blocks? Date: Mon, 15 Jan 2018 10:07:33 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1146a3e00f85520562d47d2c" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eb9AX-0004w4-7Q for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 13:07:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eb9AW-0001G4-3E for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 13:07:37 -0500 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:34474) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eb9AV-0001FX-Sc for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 13:07:36 -0500 Received: by mail-wr0-x22e.google.com with SMTP id 36so12665160wrh.1 for ; Mon, 15 Jan 2018 10:07:35 -0800 (PST) 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 --001a1146a3e00f85520562d47d2c Content-Type: text/plain; charset="UTF-8" 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? 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 --001a1146a3e00f85520562d47d2c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable --001a1146a3e00f85520562d47d2c-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: change in calling remote code blocks? Date: Mon, 15 Jan 2018 23:49:54 +0100 Message-ID: <87r2qqybxp.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebDZn-0004gB-Sx for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 17:50:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebDZk-0003Bz-Qt for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 17:49:59 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:40406) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebDZk-0003BN-KW for emacs-orgmode@gnu.org; Mon, 15 Jan 2018 17:49:56 -0500 In-Reply-To: (John Kitchin's message of "Mon, 15 Jan 2018 10:07:33 -0800") 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: John Kitchin Cc: emacs-orgmode@gnu.org 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 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: edgar@openmail.cc Subject: Re: change in calling remote code blocks? Date: Thu, 18 Jan 2018 05:48:51 +0000 Message-ID: <9f25f48c5c6075b9420d8cc04965c2d8@openmail.cc> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecAGI-0002OG-GH for emacs-orgmode@gnu.org; Thu, 18 Jan 2018 08:29:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecAGE-0003zR-Np for emacs-orgmode@gnu.org; Thu, 18 Jan 2018 08:29:46 -0500 Received: from onethreetwo.vfemail.net ([199.16.11.132]:59278 helo=vfemail.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecAGE-0003xh-G4 for emacs-orgmode@gnu.org; Thu, 18 Jan 2018 08:29:42 -0500 In-Reply-To: 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 Cc: mail@nicolasgoaziou.fr, jkitchin@andrew.cmu.edu > Message: 1 > Date: Mon, 15 Jan 2018 10:07:33 -0800 > From: John Kitchin > > 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? > > John You may try loading the file into the library of babel (org-babel-lob-ingest). Then, you can call the function without a reference to the file #+CAPTION: s1.org #+BEGIN_SRC org ,#+NAME: figure-1 ,#+BEGIN_SRC python return 2 + 2 ,#+END_SRC #+END_SRC #+CAPTION: t.org #+BEGIN_SRC org ,#+CALL: figure-1() :wrap html ,#+RESULTS: ,#+BEGIN_html 4 ,#+END_html #+END_SRC > Message: 7 > Date: Mon, 15 Jan 2018 23:49:54 +0100 > From: Nicolas Goaziou > To: John Kitchin > > This sounds like a bug. Or missed feature? > > It does ring a bell. However, I couldn't find any reference to this > syntax or behaviour in the manual. Am I missing something? I only found the evident: #+BEGIN_QUOTE By calling a named code block(2) from an Org mode buffer or a table. Org can call the named ‘src’ code blocks from the *current Org mode buffer* or from the *“Library of Babel”* #+END_QUOTE (bold added by me). > Message: 8 > Date: Mon, 15 Jan 2018 16:08:26 -0800 > From: John Kitchin > babel documentation somewhere. I confirmed it does work in 8.2.10, e.g. > just with emacs -Q. It would be nice if it did :) . Thanks for working so well on Org. I have good news: Someone to whom I introduced Emacs is now using it! (not my advisor... yet). ------------------------------------------------- ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: change in calling remote code blocks? Date: Mon, 22 Jan 2018 19:44:48 +0100 Message-ID: <878tcp68db.fsf@nicolasgoaziou.fr> References: <87r2qqybxp.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edh5Q-00031k-Ip for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 13:44:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edh5P-0001nb-LE for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 13:44:52 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:47356) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edh5P-0001hd-En for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 13:44:51 -0500 In-Reply-To: (John Kitchin's message of "Mon, 15 Jan 2018 16:08:26 -0800") 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: John Kitchin Cc: emacs-orgmode@gnu.org Hello, John Kitchin writes: > 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. Fixed. Thank you. I also updated documentation and added tests. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: change in calling remote code blocks? Date: Mon, 22 Jan 2018 20:24:01 +0100 Message-ID: <874lnd66jy.fsf@nicolasgoaziou.fr> References: <87r2qqybxp.fsf@nicolasgoaziou.fr> <878tcp68db.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edhhO-0007wK-Cq for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 14:24:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edhhN-0000EX-GR for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 14:24:06 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:36000) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edhhN-0000EH-AF for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 14:24:05 -0500 In-Reply-To: <878tcp68db.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 22 Jan 2018 19:44:48 +0100") 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: John Kitchin Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Fixed. Thank you. I also updated documentation and added tests. As a side note, file:name syntax is a bit weak. It prevents using colons in a name, as reported by the linter. I don't know if the feature is used extensively but it may be worth considering changing references syntax to, e.g, "file::name". From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: Re: change in calling remote code blocks? Date: Tue, 23 Jan 2018 12:36:06 +0800 Message-ID: References: <87r2qqybxp.fsf@nicolasgoaziou.fr> <878tcp68db.fsf@nicolasgoaziou.fr> <874lnd66jy.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113dc54296375405636a17b2" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edqK6-00016Y-R5 for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 23:36:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edqK5-0000so-Qo for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 23:36:38 -0500 Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:35830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edqK5-0000s4-L0 for emacs-orgmode@gnu.org; Mon, 22 Jan 2018 23:36:37 -0500 Received: by mail-oi0-x22c.google.com with SMTP id b11so7597875oif.2 for ; Mon, 22 Jan 2018 20:36:37 -0800 (PST) In-Reply-To: <874lnd66jy.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: Org-mode , John Kitchin --001a113dc54296375405636a17b2 Content-Type: text/plain; charset="UTF-8" I agree. use `file::name` is better. [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Tue, Jan 23, 2018 at 3:24 AM, Nicolas Goaziou wrote: > Nicolas Goaziou writes: > > > Fixed. Thank you. I also updated documentation and added tests. > > As a side note, file:name syntax is a bit weak. It prevents using colons > in a name, as reported by the linter. I don't know if the feature is > used extensively but it may be worth considering changing references > syntax to, e.g, "file::name". > > --001a113dc54296375405636a17b2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I agree. use `file::name` is better.


On Tue, Jan 23, 2018 at 3:24 AM, Nicolas Goa= ziou <mail@nicolasgoaziou.fr> wrote:
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Fixed. Thank you. I also updated documentation and added tests.

As a side note, file:name syntax is a bit weak. It prevents using co= lons
in a name, as reported by the linter. I don't know if the feature is used extensively but it may be worth considering changing references
syntax to, e.g, "file::name".


--001a113dc54296375405636a17b2--