|
From: | Ben Beeson |
Subject: | Re: How to append a git version to an output filename |
Date: | Tue, 16 Jan 2018 08:27:18 -0500 |
On Sun, Jan 14, 2018 at 4:10 PM, Urs Liska <address@hidden> wrote:Hi Ben,
Actually I misread your original post and referred you to what you already had.
Elaine's hint is true but won't bring you any further because that's what is already happening in the background when you use the \gitCommittish function.
The point is (I think) that the function is explicitly making a markup from a string - and in order to concatenate a string for the file name you should simply avoid that step.
UrsSo, the \gitCommitish returns a markup, and it needs to be a string?If so, does this help?%% TODO markup->string is in the source%% test, if it can be deleted here% mup = markup argument% conc = boolean whether to concat or not#(define (markup->string mup conc)(let ((result ""))(map (lambda (x)(begin;; if this is a concat-markup, do not insert blanks between string(if (eq? x concat-markup)(set! conc #t))(if (list? x)(set! result;; if we are concatenating or we start with an empty result, don't add a blank(if (or conc (string=? result ""))(string-append result (markup->string x conc))(string-append result " " (markup->string x conc)))))(if (string? x)(set! result;; if we are concatenating or we start with an empty result, don't add a blank(if (or conc (string=? result ""))(string-append result x)(string-append result " " x))))result))mup)result))#(define-markup-command (plain-text layout props arg)(markup?)(interpret-markup layout props (markup (markup->string arg #f))))#(define output-suffix \plain-text \gitCommitish ... )skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-
[Prev in Thread] | Current Thread | [Next in Thread] |