##How do comments work?

Comments may be attached to questions and answers when a user wishes to comment on the content of the question or answer without adding a new "Answer" of their own.  

Comments are intentionally short with a maximum of 600 characters, and allow a limited set of markup. URLs in comments will automatically become hyperlinks.  Only a single comment may be left once every 15 seconds.

---
##Who can post comments?

Anyone may leave comments on their own posts, and those with sufficient privileges (**at least 50 reputation**) may comment on any post. (There is no reputation requirement to post a comment on Meta.)

Comments can also be left on all answers to a question by the person asking the question, regardless of reputation.

Any user may delete their own comments. Moderators may delete any comment.  

Any user may also edit their comments, but only within a 5-minute window after posting. A little pencil icon will appear next to an edited comment, and a mouseover tooltip over that icon will provide a count of how many times the comment was edited.

Moderators can edit any comments at any time. This action is logged and visible in that moderator's user history to other moderators.

In all other situations, comments cannot be edited. However, in lieu of editing, they may be deleted and resubmitted. If the associated post is deleted, all comments will be deleted with it.

---

##When should comments be used?

Comments should be used for meta-discussion about a post which does not contribute to the content of the post directly.  They are sometimes used to point out factual errors in a post, or to discuss subjective issues.  Often, comments are used to address the user who created the post with a question or... well, comment.

Comments should not be used when creating an answer to a question.  In that case it is best to submit an answer, or vote up the best answer if you already see it listed.

---

##Comment formatting

Comments can be [formatted with a subset of Markdown][1]: **bold** (`**bold**`), *italic* (`*italic*`) and `code` (<code>\`code\`</code>) are allowed, while ***bold italic*** (`***bold italic***`, which renders \***bold italic**\*) is not. URLs will be automatically converted into actual links. Links are also allowed by using the syntax: `[link text](http://myurl)`.

---

##Deleting and flagging comments

Users may delete their own comments by clicking on the (x) icon, which is to the right of the comment's timestamp.  It will turn red if you roll your mouse over it, and you will be given a confirmation dialog.

A user can only delete one comment every 30 seconds.

Generally, there is very little reason to delete existing comments from a question or an answer.  There are a few possible scenarios where comments ought to be deleted, but it is worth noting that these should be few and far between, due to their permanent effect on the flow of the comment section.

  - **Spam:** Though it's hard to categorize what's spam and what is simply a verbose commenter, it's a bit like pornography.  We'll know it when we see it.
  - **Noise:** Comments like "[+1 ..][2]" or "[belongs on][3]" can be [flagged for automatic removal][4] without the commenter being punished.
  - **Thread Cleanup:** If edits have been made to a question, it *could* be feasible for a moderator to delete all comments relating to that edit once they're accepted.  A comment should be added by the deleter stating what was deleted and more importantly, *why*. For example:
> @all : Comments 1-16 detailing editing discussion were deleted when consensus was reached, to clean up the thread.

If a comment doesn't meet either of the criteria above, then it shouldn't be deleted.

---

##Voting on comments

See [How does comment voting and flagging work?][5]

---

##Replying to comments

See [How do comment replies work?](http://meta.stackoverflow.com/questions/43019/how-do-comment-replies-work)

---

##Automatic comments

If you vote to close a question as an exact duplicate (requires 3,000 reputation) then the system will automatically post a comment to that question under your name that reads "possible duplicate of -link-" if no such link has already been posted in an existing comment.

The comment will be upvoted whenever someone else votes to close as exact duplicate with the same question link.

The comment will be automatically deleted if the question is closed as a duplicate.

You still own the comment so you may delete the comment if you desire. This is discouraged as it is helpful to the person who asked the question: if the author thinks their question is unique, seeing a possible duplicate allows them to make changes to differentiate from the duplicate.

---

##Linking to comments

It's [not officially possible][6] to directly link (permalink) to a comment, in the context of its question or answer. An [unsupported workaround][7] exists, but requires a comment to have at least one upvote, and breaks *without showing any error* if the comment is ever deleted (or if the site layout is changed), leaving the visitor wondering what happened.


  [1]: http://blog.stackoverflow.com/2010/01/new-improved-comments-with-reply/
  [2]: http://meta.stackoverflow.com/questions/15290/are-all-the-1-comments-really-necessary
  [3]: http://meta.stackoverflow.com/questions/18494/belongs-on-comments
  [4]: http://meta.stackoverflow.com/questions/15290/are-all-the-1-comments-really-necessary/15292#15292
  [5]: http://meta.stackoverflow.com/questions/17364/how-does-comment-voting-and-flagging-work
  [6]: http://meta.stackoverflow.com/questions/5436/direct-link-to-a-comment/44119#44119
  [7]: http://meta.stackoverflow.com/questions/5436/direct-link-to-a-comment/27319#27319