Hi Andrew,
Ha! Works like a charm! Thanks, that's going to be super-handy when I, uh … start my lilypond publishing empire. Seriously, though, that's some cool scripting magic.
For others who might want to use the function, one remark: note that the quotation marks for the "catalog-number" variable are not straight-quotes in the provided example (they're so-called "smart-quotes", which Scheme does not recognize and throws a syntax error if not replaced). So, make that trivial change, and you're all set for automagically-generated catalog IDs. I also re-named the variable to "composer-shortstring" to make clear that it's not the definition set in \header, and that it can be a different format from the full name.
Cheers,
A