This one draws graph of cons cells (lists): 

https://github.com/amno1/draw-cons-tree

I never tried with random s-expressions, but I guess you could pass them in as lists?


-------- Originalmeddelande --------
Från: Juan Manuel Macías <maciaschain@posteo.net>
Datum: 2022-06-30 16:20 (GMT+01:00)
Till: orgmode <emacs-orgmode@gnu.org>
Ämne: Convert a Lisp expression to a tree diagram

Hi all,

Sorry for the slight offtopic. I'd like to be able to graphically
convert (from a src block) a Lisp expression to a tree diagram, similar
to trees used in (human) syntax and grammar, especially generative
grammar (this is a web app for generating such trees:
http://www.ironcreek.net/syntaxtree/). I think I can try some LaTeX hack
using the 'forest' package (here's a related thread with pros and cons:
https://tex.stackexchange.com/questions/140812/drawing-a-lisp-expression-as-a-tree),
but I was wondering if anyone knows of any more emacs/elisp/org friendly
packages/solutions. Some time ago I saw an Emacs package that could
convert a Elisp expression into an ascii text tree diagram, but I can't
remember its name and I can't find it anywhere...

Best regards,

Juan Manuel