710

How do the comment replies (aka "pinging users") work?

  • Who can I send an @reply to?
  • How do I respond to a specific user when entering my comment?
  • Will they be notified?
  • What do people mean when they talk about "pinging" another user?

Related:

  1. How do I view the recent replies to things I have written?

Return to the FAQ index

3
  • 2
    I strongly suggest we need a common term for this, how about namechecking? Otherwise it's insanely search-hard, as @IlmariKaronen mentions. 'notification' is too bland, and connotes routine notification of non-comment things. Mods if you agree, please create a tag namechecking and apply to this?
    – smci
    Commented Apr 12, 2014 at 23:35
  • 5
    Recently, on numerous occasions, I've tried to start a comment with at-symbol and the name of a previous commenter, and after posting the comment the at-symbol-and-name has disappeared completely. Other times it seems to work fine. Any explanation for this behavior?
    – gwideman
    Commented Apr 15, 2014 at 1:18
  • 2
    @gwideman, see point 10 in the accepted answer.
    – Arjan
    Commented Apr 17, 2014 at 19:56

1 Answer 1

590

You can use @name syntax anywhere in your comment to reply to a specific user. This will notify that user in their global inbox. There can also be notification through email if you set it up in the preferences found in your profile page. This feature is specific to comments and doesn't work in posts.

Who can be notified with this feature?

  • The author of the specific post (question or answer).

    Note that the author of the post will always be notified of any new comment. You may still use it for clarity, if needed; however, if there are no comments, or only you or the author have commented on the post so far, the @name will be automatically removed from the beginning of the comment, as it adds no value. (To avoid breaking sentences, mentions not at the beginning will not be removed.)

  • Any user who has a visible (non-deleted) comment on the post.

    This is usually through the @name feature. Additionally, if a user comments on their own post and there is only one other person who has previously commented on that post, then that person is also notified, even if @name is not used.

    However, if the visible comment(s) being replied to are deleted, apart from several exceptions with diamond moderator's comments on deleted posts, then the notification is removed, regardless of whether or not the recipient has already seen the notification.

  • Any user who has edited the post (does not include pending or rejected edit suggestions).

  • For questions: The non-moderator user who closed or reopened the question, provided they were the only one to do so. On most sites, this only includes users with gold tag badges who single-handedly closed or reopened duplicate questions. Other cases of this include closures/reopenings on Stack Overflow prior to 2009 and on Hardware Recommendations after mid-2019. If other users were also involved in the closure (e.g., closed by User1, User2, and GoldBadgeUser), no users can be notified.

  • For questions: the moderator user who closed or reopened the question. Unlike the above case of non-moderator users, there are no restrictions on whether the moderator was the sole user involved in the action. Do note that this checks whether the user cast their binding vote in their capacity as a moderator, so if a user wasn't a moderator at the time but later became one they cannot be notified, and if they were a moderator but later ceased to be one, they can still be notified.

  • For questions: any user who put a bounty on the question (current or expired)

Keep in mind that the question and answers are all considered independently. For example, if Alice was the author of the question, then you cannot notify her by commenting on Bob's answer (unless Alice also participated in that answer or is following the answer). Similarly, you cannot notify Bob by commenting on Alice's question (unless Bob participated in or is following the question).

Why do some names not appear in the auto-complete box?

Only users who have commented on the post are populated into the list. Editors and other users from the post's history will never appear there, even if they are able to be notified by typing manually. The author is also not included unless they commented.

Users without an account on the site (i.e., if their name shows up without a link, such as deleted users) will not show in the autocomplete, as there's no active account to which to send the notification.

Can I notify more than one person at a time?

No. Comments containing more than one @name are blocked unless they contain a backtick `. In the latter case, only the first name mentioned using the @name syntax will be notified. For example, @alice `@bob Hi!` will notify Alice (if she has participated in that post), but not Bob.

An exception is the case when the first @name either matched nobody or matched the post's author (and thus isn't necessary); in this case, the next @name will be checked. Note that these checks only apply to the first @name, not subsequent ones; if the first one matches someone, and there are multiple @name mentions (or any text of the form @something), the comment will still be blocked.

Can I change who gets notified after the comment is posted?

When editing a comment within its limited editing period, if you change or add @name, the notification may or may not reach the new recipient depending on timing.

Are there any special keywords for notifying users?

No. Things like @op, @downvoter, or @all have no special meaning and will not trigger any notifications.

How do the names get matched?

  • You must include @name, where name is a reasonable match to a user's current display name at the time the comment is submitted. You cannot use previous display names the target may have had.

  • The notification must begin with a space or be at the start of the comment. For example, you cannot use markup such as italics.

    • Note that the autocomplete may still show up even if there is a non-space character at the beginning of an @name mention. This does not mean that it will work.
  • If the first word in the display name is at least three characters long, then there must be a starts-with, case-insensitive match of at least three characters in the display name. This means @a and @ab will never match anyone, unless a user uses a first word that is only two characters. Like: @Jo will notify Jo Miller, but not John, and @B. will notify B. Gates, but not B.Gates. If there are more than three characters in @name, then all given characters must match (neither @alix nor @aliceinwonderland will match user Alice).

  • Matching is performed in reverse chronological order, so if multiple people named John are participating, @john will match the most recent John. (Use the next rule to differentiate. Note that in this case, the autocomplete may show multiple listings for the same username, but there's no difference in selecting any one of those.)

  • Spaces are removed from the display names for matching purposes. So to match Peter Smith you may use @pet, @peter, @peters, or @petersmith. The last two are useful if Peter Jones is also participating, who can then be distinguished using @peterj. However, no spaces are allowed in the @name itself. Like to notify P Smith, one must use @psm or @psmith. (Here @P Smith would be handled as just @P, which is too short.) Single quotes, dots, dashes and underscores should not be removed.

  • Special characters are replaced with their simple equivalent. To reply to Piëre you can use both @piëre and @piere. And to reply to Jörg you could use @jorg, but not @joerg.

Does other punctuation affect the notification?

The system does attempt to ignore most punctuation to allow for proper notifications, such as a single trailing dot, comma, or colon. The exact matching rules are not documented, but extensive tests performed on 30 August 2011 indicate that the following algorithm is used:

  • Take the first word immediately following the @, where the word boundary is determined by a space, a character not valid in user names (such as : , / ! ?) or the end of the comment.
  • Remove one trailing dot . from the resulting string if applicable (and if the string has more than two characters).
  • If the remaining string ends in ' or 's, remove that piece from the string.
  • The resulting string will be matched against the user name with spaces removed.

Example: The comment ends with @O'Conner's.). The word immediately following the @ is O'Conner's. since ' and . are valid in display names. Then the trailing dot is removed, and finally the 's is removed, resulting in O'Conner.

Some examples of supported notifications:

  • @name some text
  • @name: some text
  • @name. Some text
  • @name, some text
  • some text, @name
  • some text, @name, more text
  • Some text, @name.
  • This is mentioned in @name's comment.
  • @P. for both P. Smith and P. Jones (whoever commented most recently), but not P.Smith nor P.Jones. Likewise, @P. Smith is handled as @P., so also matches P. Smith or P. Jones.
  • @psm or @psmith for P Smith
  • @peters or @peterj for Peter Smith or Peter Jones respectively
  • @name...

Examples that will not trigger notifications:

  • abc@name
  • *@name*
  • *@name:*
  • [@name](https://some-url)
  • @[name](https://some-url)
  • @P Smith
20
  • 9
    @Vinayak Yes, it's experimentally confirmed. As with editors, you do not get autocomplete but ping works.
    – user259867
    Commented Sep 11, 2015 at 22:03
  • 5
    Seems either I misunderstood the paragraph on spaces, either something is broken, because I frequently have a problem with spaces. See here in the comments for example, I tried to notify @Joachim Pileborg, and no link appears in the comment (same here). How do I know if he got notified ?
    – user137902
    Commented Jan 22, 2016 at 8:52
  • 1
    Is there any way to escape an @ ? I might mention a java annotation in a comment and the comment processor tells me I can't send to more than one person. Commented Mar 28, 2016 at 1:33
  • 2
    @MikeJR: "Can I notify more than one person at a time?", seems to imply that a backtick will escape an @. But I haven't confirmed that. Commented May 12, 2016 at 12:16
  • 2
    suppose i want to comment user named David Cuccia so @David Cuccia and @DavidCuccia will both work ? one is with space and other without space ?
    – Shaiju T
    Commented Jul 4, 2016 at 16:35
  • 3
    I see that "downvoter" and "all" are legal usernames. I expect "op" is, also. ;)
    – Wildcard
    Commented Jan 5, 2017 at 21:59
  • 2
    Not clear+succinct enough to make me realize soon enough that \@John Pankowicz is converted to @JonPankowicz Commented Mar 11, 2017 at 7:39
  • 4
    What if a user changes their display name? Does the @ pointer get updated or does it still use the older name?
    – Stevoisiak
    Commented Mar 20, 2017 at 15:33
  • 7
    @StevenVascellaro: The "@ pointer" is not updated when users change their username. I now this because on Web Applications and Stack Overflow there is a user that frequently participates in the tags that I follow and they have changed their name a lot. (I usually use they instead of he/she when I don't know the proper pronoun ).
    – Rubén
    Commented Apr 5, 2017 at 18:55
  • 7
    Can the auto-complete please get fixed? I just tried notifying an editor but since their name didn't show up in the auto-complete, I gave up on it. Commented Aug 22, 2017 at 10:13
  • 2
    @MikeJRamsey56 A java annotation could be formatted as code anyway, so just use that, which, yes, means encasing it in backticks. (@name).
    – Miriam
    Commented Jul 25, 2018 at 13:01
  • 1
    (1) This says that a backtick (`) can allow a second “at” symbol in a comment. Apparently this works even if the backtick isn’t matched (i.e., if the ‘@’ symbol isn’t formatted as code). But does this mean that `@ is never treated as a ping, even if it’s the first ‘@’ in the comment? (2) This lists abc@name as an “example” of a non-ping, without giving a general rule that it is an example of. Is ‘@’ always treated as a non-special, literal text character if it’s preceded by a non-blank? (There’s a comment (above) about \@, but I don’t understand it.)  … (Cont’d) Commented May 30, 2019 at 17:25
  • 2
    (Cont’d) …  (3) This lists *@name* as an “example” of a non-ping.  What about *I hope @name sees this.*?  (4) This lists [@name](URL) as an “example” of a non-ping, but I suspect that [blah blah @name blah blah](URL) works.  (5) I understand that the algorithms for detection of fraud and spam, etc., are secret to make it harder to game them.  But why can’t we get official documentation on how ‘@’ works? Commented May 30, 2019 at 17:34
  • 1
    Dear W: Would you please let me know if you get a notification for this: I believe that @Wildcard is a valued contributor to this site. Commented May 30, 2019 at 17:46
  • 2
    @G-Man, yes, I got a notification.
    – Wildcard
    Commented May 30, 2019 at 18:54

You must log in to answer this question.