From: lilypond-user <lilypond-user-bounces+carl.d.sorensen=gmail....@gnu.org> 
on behalf of Carl Sorensen <c_soren...@byu.edu>
Date: Thursday, February 10, 2022 at 3:20 PM
To: Curt McDowell <c...@fishlet.com>, "lilypond-user@gnu.org" 
<lilypond-user@gnu.org>
Subject: Re: Edit scheme files with Frescobaldi



From: lilypond-user <lilypond-user-bounces+carl.d.sorensen=gmail....@gnu.org> 
on behalf of Curt McDowell <c...@fishlet.com>
Date: Thursday, February 10, 2022 at 3:08 PM
To: "lilypond-user@gnu.org" <lilypond-user@gnu.org>
Subject: Edit scheme files with Frescobaldi


Hi all,

Some of my projects #(load "external_scheme_files"). For example, if song.ly 
contains

\version "2.20.0"

\include "articulate.ly"

#(load "swing.scm")

\header {

...

then if I open song.ly in Frescobaldi and use Engrave (preview), it doesn't 
find swing.scm (doesn't know to copy it to the tempdir?) And if I Open 
swing.scm in Frescobaldi, it tries to compile that as a .ly format.

Is there a way to open .scm files in Frescobaldi alongside the .ly files, be 
able to edit them all and engrave/publish on demand (maybe using a session)? I 
haven't found how in the docs.

The way I do it is to embed the scheme code in an ly file.  Instead of calling 
it “swing.scm”, call it “swing.ly”, and preface functions with # as needed.  
And then you can just \include “swing.ly”.

Or, if the file is used in lots of your projects, you can include a path along 
with the file name in your load call.

Carl


Reply via email to