On python, you can repeat a value several times inside a string when formatting it:
>>> print "Hello, {name}, how are you, {name}?".format(name="George") "Hello, George, how are you, George?" But I don't know how to achieve this with elisp. I'm trying to make a function that returns the GPLv3 copyright text (This file is part of Foobar. Foobar is free software:) with the name of any projectile project on it.
formatsupports specifying the number of a field. That is,(format "%1$d, %1$d, %2$d, %2$d" 5 7)evaluates to"5, 5, 7, 7". SeeM-x describe-functionofformat.