[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fatal error: define-session used after session start with LSR 392
From: |
David Kastrup |
Subject: |
Re: fatal error: define-session used after session start with LSR 392 |
Date: |
Sat, 06 Apr 2013 23:57:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Eluze <address@hidden> writes:
> hi
>
> with the code of snippet http://lsr.dsi.unimi.it/LSR/Item?id=392
>
> invoked on the command line
>
> "c:\program files (x86)\lilypond2.17.11\usr\bin\lilypond.exe" myfile.ly
>
> I get
>
> fatal error: define-session used after session start
>
> versions before have no problem
>
> any clues?
The code is not just messing with internals, it is _reloading_
internals. Ugh. Here is a version that "merely" messes with internals:
\header { title = "Creating the list of all supported midi instruments" }
% We apply a lambda function to the list (instrument-names-alist) of instrument
definitions
% That function simply creates a markup containing the name as a simple string
(the first
% entry of the instrument definition is the name, thus the (car instr).
% Since we return a list of markups, we have to define that function as a
markup-list command
#(define-markup-list-command (midi-instruments-markup-list layout props) ()
(interpret-markup-list layout props
(map (lambda (instr) (markup (car instr))) (@@ (lily)
instrument-names-alist))))
% simply display the list of markups generated by the function above
\markuplist \midi-instruments-markup-list
But in truth: it does not make much sense that the instrument name data
is not publicly available, possibly via a separate function.
--
David Kastrup