Thanks Richard.

I didn't know if let and set! had two different functions.

Joe

On 18/11/2019 09:29, Richard Shann wrote:
On Sun, 2019-11-17 at 21:32 +0000, Joe Wilkinson wrote:
They can go

This does what I want

(d-AddVerse)
;LyricFontSize
(let ((text #f))
(d-InsertTextInVerse (string-append "\n\\override LyricText.font-size
=
#-2 \n"))
   (d-SetSaved #f))
;InsertStanzaNumber
(let ((text "1. "))
(set! text  "Ch.")
You want to have just
(let ((text "Ch."))
here, the initialization of text to "1. " is immediately overwritten by
setting it to "Ch."


(d-InsertTextInVerse (string-append  "\\set stanza = \\markup {"
"\\fontsize #-2  "  text "}\n"))
(d-SetSaved #f))

It is easier to put the command in and then edit the stanza line
than
doing it interactively (for my purposes anyway)

And I think I could lose the first SetSaved command.
yes - you only need do it at most once, anywhere in your script.
Indeed, many commands you call are scripts that alter the score and
make that call (to mark the score as unsaved) themselves -
d-InsertTextInVerse
does this, so you don't need to call d-SetSaved in your script at all.

Richard

Reply via email to