-Eluze <elu...@gmail.com> writes: > Phil Holmes-2 wrote: >> >> >>> >>> the basic function in LilyPond is given with >>> >>> \include "test.ly" >>> \markup \verbatim-file #"test.ly" >>> >>> now I don't know what you mean with automatically - should it be attached >>> every time? on a new page, in another (pdf) file? >>> >>> or did you mean something else? >>> >>> Eluze >> >> >> I do think this would do what the user wants, if we did not need to put >> the >> filename in explicitly. Is there any way of getting the filename into a >> variable? >> >> > > there is a snippet that derives the filename from the command line: > http://lsr.dsi.unimi.it/LSR/Item?id=197 File Information but it doesn't > work with 2.15.41 and also for 2.14.2 the filename may not have blanks.
What's wrong with using input-file-name ? This should work for the main input file. If you need more than that, you can likely work with something like #(read-hash-extend #\< (lambda (c p) (port-filename p))) #(display #<) This will not work before 2.15.twentyish (when I decided that the terrible error messages for Scheme code were not doing anybody a favor, and made port-filename, port-line, and port-column point to sensible locations). -- David Kastrup _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond