lilypond-user
[Top][All Lists]
Advanced

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

Re: Warning when defining variables on the command line


From: Aaron Hill
Subject: Re: Warning when defining variables on the command line
Date: Tue, 19 Nov 2019 07:39:11 -0800
User-agent: Roundcube Webmail/1.3.8

On 2019-11-19 3:37 am, Matt Wallis wrote:
I want to pass the subtitle into lilypond on the command line because
it is also required by other programmes (e.g. sox needs the subtitle
to create a tag for the mp3 it creates).
[ . . . ]
But I now get the warning:

    Parsing...WARNING: #f: imported module (guile-user) overrides core
binding `%module-public-interface'

Should I be concerned? Is it safe to ignore? Can I suppress this warning?

With a little more work, you can peek into the guile-user module and grab out what you need without importing the entire module into the current environment:

%%%%
\version "2.19.83"

#(define (guile-user-lookup sym def)
  (let ((mod (resolve-module '(guile-user))))
    (if (module-defined? mod sym) (eval sym mod) def)))

#(format #t "\nHello, ~a!" (guile-user-lookup 'hello "..."))
%%%%

====
$ wsl lilypond guile-user.ly
GNU LilyPond 2.19.83
Processing `guile-user.ly'
Parsing...
Hello, ...!
Success: compilation successfully completed

$ wsl lilypond -e '(define hello "World")' guile-user.ly
GNU LilyPond 2.19.83
Processing `guile-user.ly'
Parsing...
Hello, World!
Success: compilation successfully completed
====


-- Aaron Hill



reply via email to

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