2 ms·
Have you actually looked at what cog does? I don't see how you would manually use Emacs commands to do the same more than once.
by nedbat 8y ago
Have you actually looked at what cog does? I don't see how you would manually use Emacs commands to do the same more than once.
- anschwa 8y agoI'm not exactly sure I understand the use-case, but as far as the example used in the article, shell-command-on-region accomplishes the same kind of thing. Why not leave the "generation code" as a comment in your file the same way cog does?
- PurpleRamen 8y agoTemplate-generators like cog are meant to run periodically, for example every time you 'compile' your project. Often they contain dynamic elements which can change between each run. Using your emacs-command would defeat that purpose, because you would need to search the region at every run and re-execute it manually again and again and again. And you would need to documentate the command anyway, because nobody can remember all those regions. So why not automate this task then?