From: George Mauer <gmauer@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: call blocks as a function from inside elisp code
Date: Wed, 19 Jan 2022 09:56:09 -0600 [thread overview]
Message-ID: <CA+pajWKWT0s1FOZy3gG=WweYwRLTaPsxEKqVQXeZEYTbi4wuvg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]
Hi everyone,
I know that I can call a source block as a function in a header argument
such as :var, inside noweb annotations, or with a #+call: as described here
https://orgmode.org/manual/Evaluating-Code-Blocks.html
I am interested in going one step further though.
I have one emacs-lisp block that generates a list of python files which
mention a search term provided by a variable (eg
gim/get-file-list(search="_utilities") )
I have another code block written in python that given a python filename
will do some ast parsing to tell me some interesting facts about it (eg
#+call: gim/get-python-program-info(filename="foo/bar/some_module.py") )
What I would like to do is to chain the two together (ideally inside a code
block so I can dynamically format the output) so that I can get info on
*each* of the files produced by the first block.
So is there a way to do the equivalent of #+call:
gim/get-python-program-info(filename="foo/bar/some_module.py") from
*inside* an elisp code block? I am aware that I can call things via noweb,
but I'm trying to see if I can avoid that for several other reasons
[-- Attachment #2: Type: text/html, Size: 1370 bytes --]
next reply other threads:[~2022-01-19 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 15:56 George Mauer [this message]
2022-01-19 16:43 ` call blocks as a function from inside elisp code Eric S Fraga
2022-01-19 20:00 ` Tom Gillespie
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='CA+pajWKWT0s1FOZy3gG=WweYwRLTaPsxEKqVQXeZEYTbi4wuvg@mail.gmail.com' \
--to=gmauer@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).