emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: edgar@openmail.cc
To: emacs-orgmode@gnu.org
Cc: mail@nicolasgoaziou.fr, jkitchin@andrew.cmu.edu
Subject: Re: change in calling remote code blocks?
Date: Thu, 18 Jan 2018 05:48:51 +0000	[thread overview]
Message-ID: <9f25f48c5c6075b9420d8cc04965c2d8@openmail.cc> (raw)
In-Reply-To: <mailman.107.1516122017.10361.emacs-orgmode@gnu.org>

> Message: 1
> Date: Mon, 15 Jan 2018 10:07:33 -0800
> From: John Kitchin <jkitchin@andrew.cmu.edu>
> 
> 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 <mail@nicolasgoaziou.fr>
> To: John Kitchin <jkitchin@andrew.cmu.edu>
> 
> 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 <jkitchin@andrew.cmu.edu>

> 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!  

       reply	other threads:[~2018-01-18 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.107.1516122017.10361.emacs-orgmode@gnu.org>
2018-01-18  5:48 ` edgar [this message]
2018-01-15 18:07 change in calling remote code blocks? John Kitchin
2018-01-15 22:49 ` Nicolas Goaziou
2018-01-16  0:08   ` John Kitchin
2018-01-22 18:44     ` Nicolas Goaziou
2018-01-22 19:24       ` Nicolas Goaziou
2018-01-23  4:36         ` numbchild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f25f48c5c6075b9420d8cc04965c2d8@openmail.cc \
    --to=edgar@openmail.cc \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).