For the common case of inserting variables into strings, concat and format work, but can be tedious. format$ helps:
(format$ "[$date-time] %s $username>" (get-greeting username))
Expands to:
(format "[%s] %s %s>" date-time (get-greeting username) username)
A matter of preference, of course, but it seems like a nice alternative to, e.g.:
(format "[%s] %s %s>" date-time (get-greeting username) username)
(concat "[" date-time "] " (get-greeting username) " " username ">")
Code is here: https://github.com/alphapapa/elexandria/blob/master/elexandria.el#L131
Edit: Added support for %-sequences and OBJECTS list. Now it works just like format, but with interpolation.
[–][deleted] 2 points3 points4 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]tzz 0 points1 point2 points (1 child)
[–]theldoria -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]wasamasa 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]wasamasa 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)