From 61bef7ed7a0592dc8ca4718070c09958543d0b4c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 4 Jun 2023 11:55:09 +0200 Subject: get-selection-as-string: Set dotted form of fixture name Previously it sent "(list-ref xxx nnn)", which is much harder to parse and defeats the point of using a string instead of a Scheme expression here. This routine is currently only used for OSC selection updates. --- guile/starlet/selection.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'guile') diff --git a/guile/starlet/selection.scm b/guile/starlet/selection.scm index 7e5ca1a..2798fc1 100644 --- a/guile/starlet/selection.scm +++ b/guile/starlet/selection.scm @@ -41,12 +41,20 @@ selection) +(define (dotted-fixture-name s) + (with-output-to-string + (lambda () + (format #t "~a.~a" (second s) (third s))))) + + (define (get-selection-as-string) (cat-with-spaces (map (lambda (s) - (symbol->string - (get-fixture-name s))) + (let ((name (get-fixture-name s))) + (if (symbol? name) + (symbol->string name) + (dotted-fixture-name name)))) selection))) -- cgit v1.2.3