Urs Liska <[email protected]> writes:

> Thank you for that. However,
> (interpret-markup-list layout props result)
> returns all strings concatenated to one line.

No, it doesn't.  It returns a markup list, and if you put this into a
\markup without change, _then_ this list will be assembled into a single
line by implicitly calling \line on it.

With something like

\markuplist \column-lines \...

you get it properly spaced and broken across pages.  At least that's the
theory.

#(use-modules (ice-9 popen))
#(use-modules (ice-9 rdelim))

#(define (strsystem_internal cmd)
   (let* ((port (open-input-pipe cmd))
          (str (read-delimited "" port)))
     (close-pipe port)
     str))

#(define-markup-list-command (gitCommand layout props cmd) (markup?)
  (let* ((result
	  (string-split
	   (strsystem_internal (string-append "git " cmd))
	   #\newline)))
    (interpret-markup-list layout props result)))

\markuplist \column-lines \gitCommand "log -1"
In current practice, it would appear that empty strings do not exactly
lead to expected behavior (I mean, wow), so you should use "map" to swap
them out for non-empty strings.

-- 
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to