History of 2017-07-02 Using yasnippet programmatically

2017-07-02
04:30 UTC Revision 1 . . . . Marcin BorkowskiSome time ago I was writing an Emacs function to insert a certain template into a buffer. The template had a few places where user-defined strings should be put. My first approach was to write a template-interpolation facility for Elisp, and I will most probably blog about it some day – I learned a bit from it (spoiler: don’t use strings for heavy string manipulations, buffers are faster!). But after I revisited the issue after some time, it occured to me that it doesn’t make too much sense to first ask the user for some strings (using read-string or even completing-read) only to put it in the template with my functions when YASnippet is available!