[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Format with %-*
From: |
Bruno Barbier |
Subject: |
Re: Format with %-* |
Date: |
Mon, 08 Jul 2024 19:47:46 +0200 |
Heime <heimeborgia@protonmail.com> writes:
> Why do I get "error: Invalid format operation %*" and how can I fix it ?
>
>
>
> (defun insert-labels-in-columns (monbf col1-labels col2-labels col3-labels)
[...]
It seems that your problem could be reproduce with this one line:
(format "%-*s" 10 "label")
It raises this error:
(error "Invalid format operation %*")
and, indeed, I don't see the format control "%*" anywhere in the
'format' documentation, so, it looks like it's not a valid format
operation.
If you just copy/pasted a C 'printf' format, you probably should use
something like this instead:
(format (format "%%-%ss" 10) "label")
HTH,
Bruno