# Is there a way to auto-insert the revision number into the text of a post?

I've written a function that facilitates abbreviated system names in postscript code. And I'd like to "host" the code in an answer to the Postscript tips question.

Is there a way to auto-insert the revision number into the post (ideally into the code block itself)?

In the event that improvements/changes are made, I want all copies of the function to identify themselves as to where they came from.

• I've never heard of one, and I can't think of many use cases...unless we start thinking of SE posts as effectively VC repositories (which is what you are suggesting, more or less). Perhaps the team will be interested. – dmckee --- ex-moderator kitten Aug 30 '13 at 19:18
• Yeah. Getting it into the code block would take their help. But I suspect it could be done with javascript in the text of the post. I could add instructions to the user: "%Copy this line, too! Rev ##". – luser droog Aug 30 '13 at 19:22
• Answers should be self contained. If the repo hosting the code disappears some time in the future, the mods would probably have to end up deleting the answer. This is already a problem with answers containing ordinary urls. – gnibbler Aug 31 '13 at 20:39
• Perhaps I didn't explain clearly, but there is no external repo. The code-block in the answer text itself would be the repo. But as all tips questions are CW, it might be edited and improved by other users (good!), but this could lead to multiple inconsistent unidentified versions (bad!). Ideally the user could highlight/copy/paste the code block into a text file, and if necessary the user can inspect the file to discover the exact version they have (== revision number of the PPCG.SE Answer). – luser droog Aug 31 '13 at 20:45

URL: http://meta.codegolf.stackexchange.com/revisions/660/3