emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* call blocks as a function from inside elisp code
@ 2022-01-19 15:56 George Mauer
  2022-01-19 16:43 ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: George Mauer @ 2022-01-19 15:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-19 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19 15:56 call blocks as a function from inside elisp code George Mauer
2022-01-19 16:43 ` Eric S Fraga
2022-01-19 20:00   ` Tom Gillespie

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).