emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

call blocks as a function from inside elisp code


From: George Mauer
Subject: call blocks as a function from inside elisp code
Date: Wed, 19 Jan 2022 09:56:09 -0600

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]