lilypond-user
[Top][All Lists]
Advanced

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

Re: Running a Guile Interactively


From: Kon Rybnikov
Subject: Re: Running a Guile Interactively
Date: Sun, 6 Feb 2022 16:48:59 +0200

On Sun, Feb 6, 2022 at 1:16 PM Kon Rybnikov <k-bx@k-bx.com> wrote:
Hi

My goal is to run guile with a remote port to use it with Geiser. See "Connecting to an external Scheme" [0].

However, I've failed at the very first step of just getting a Guile REPL with my lilypond file. I was following the instructions in "Using Guile interactively with LilyPond" [1]. I've created a file debug-scheme.ly with the following contents:

    \version "2.22.1"
    #(module-define! (resolve-module '(guile-user))
                     'lilypond-module (current-module))
    #(top-repl)

And then I've launched the `lilypond debug-scheme.ly` command and saw this:

    $ lilypond debug-scheme.ly
    GNU LilyPond 2.22.1 (running Guile 2.2)
    warning: cannot find file: `debug-scheme.ly'
    fatal error: failed files: "debug-scheme.ly"

Am I doing something wrong?

Thank you!
Kon

[0]: http://www.nongnu.org/geiser/geiser_3.html#The-REPL
[1]: https://lilypond.org/doc/v2.21/Documentation/contributor/debugging-scheme-code

All right, the code from ly/scheme-sandbox.ly actually worked:

  \version "2.16.0"

  #(load-user-init)

  #(define a (+ 2 3))

  #(newline)
  #(cond-expand
     (guile-2
       (begin
         (use-modules (system repl repl))
         (start-repl)))
     (else (scm-style-repl)))

I was able to successfully get a guile REPL where I can type "a" and see its value.

Now, the question still remains: is it possible to expose a port to use Emacs+Geiser?
 

reply via email to

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