Converting comment to answer

Is this done by just writing the answer and deleting the comment? Can you delete a comment that has been there for a while? (I ask this because I think you can't edit a comment after a few minutes--can you delete it though?)

2 Answers

Yes, the author of a comment (or a moderator) can delete the comment at any time (s)he deems it appropriate [subject to the restriction that you can only "vote" on comments five seconds apart, and deleting a comment counts as voting on a comment. So if you just deleted, or voted on, another comment, you have to wait five seconds Apparently deleting one's comments no longer counts as a vote, so that restriction seems to no longer apply - or I may just have been too slow].

Now if a moderator could insert a screenshot including the comment on the question I deleted just before writing the answer, we'd have a nice illustration.

• I believe the 5 second voting limit is no longer in place. It might be that it just doesn't apply to moderators, but it used to apply to us as well. – Alex Becker Apr 6 '14 at 18:00
• I just tried, @AlexBecker, after finding two upvoteable comments in close proximity. The "You can only vote every five seconds" banner popped up. [Note: The quotes don't mean it is a verbatim quote. The popup vanished too quickly to memorise the text.] – Daniel Fischer Mod Apr 6 '14 at 18:09
• Huh. So I guess it is only moderators who aren't subject to it. – Alex Becker Apr 6 '14 at 18:11
• @AlexBecker Just tried, it seems deleting a comment no longer counts as a vote. – Daniel Fischer Mod Apr 6 '14 at 18:13
• Strange, I never heard about them changing that system. Anyway, the vote limit definitely doesn't apply to mods, as I can upvote comments with abandon. – Alex Becker Apr 6 '14 at 18:14
• I may just have been too slow. But it seemed less than five seconds to me. – Daniel Fischer Mod Apr 6 '14 at 18:16
• I tested this: the 5-second restriction still applies to deletions. Moderators are exempt from this limit. – user127096 Apr 6 '14 at 18:20

Yes, the conversion is a manual process. If the comment that you want to turn into an answer contains TeX markup, copy-pasting becomes a bit tricky. My workflow is

1. Select "View page source" in Chrome (there are equivalents in other browsers)
2. Search the source for the name of commenter.
3. Copy the text of comment, which now includes TeX markup.
4. Paste into the answer box.
5. Check for $<$ signs; for technical reasons, these are present as &lt; in the source. MathJax normally understands $a &lt; b$ as $a<b$ (e.g., it does on the demo page) but, for a reason unknown to me, this does not work here. So I change those &lt; back to <.
6. If the comment wasn't mine, I add a link to a comment (obtainable from its timestamp), the name of its author, and mark the answer as community wiki.
• For some reason, if comments are folded they are not shown in the source. (Even after I click on them to unfold. At least it is the behavior I saw, when I tried it a while ago.) A workaround in such cases might be using StackPrinter, as discussed here. – Martin Sleziak Apr 6 '14 at 17:31
• @MartinSleziak It's also possible to get the markup via an API method, but because it returns JSON format, the backslashes are escaped (they appear as double backslashes), making the code unsuitable for direct copy-paste. Luckily this isn't an issue that arises often enough, or I'd be writing a browser extension for getting comment source via API and presenting it to user in a pop-up. (Checked StackApps; no such thing there yet.) – user127096 Apr 6 '14 at 17:50
• @MartinSleziak The reason is simple: the page source that the browser shows is the HTML page that it received from the server. It does not reflect any client-side modifications, which are performed with Javascript after the page has been received. ("Show more comments" is such a modification; a script fetches those comments as you click.) You can see the script-processed content with "Inspect Element" feature, which brings up Developer Tools. However, this content is already processed by MathJax, and is neither readable nor copy-pasteable. – user127096 Apr 6 '14 at 18:32