5.16.1 Investigate the code using the Geiser REPL

Spawn a REPL server in lepton-schematic:

(use-modules (system repl server)) (spawn-server)

Move to your Emacs and do M-x connect-to-guile. You’ll see the REPL prompt.

Import the module you would like to work on: either hit C-c C-i to get the prompt, or just write, for example

scheme@(guile-user)> ,use (schematic action-mode)

To get info on what functions are present in the module, hit C-c C-d C-m and enter the module name. Then follow the links provided to get the info on separate functions. You can also type the function name you want and do C-c C-d C-d or C-c C-d C-i on it to get the help.

Sometimes you don’t want to work with the GUI. Supposed that you don’t run lepton-schematic and just want to work with functions of some Lepton module interactively in REPL, you’ll just issue M-x geiser and then add the path for the module to the Guile load path:

scheme@(guile-user)> (add-to-load-path "/usr/share/lepton-eda/scheme")

Then you’ll be able to investigate the contents of a module under the path as described above.