What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

The increase in the character limit of comments has led them to become as important as the questions and answers that spawn them. On several occasions (especially on meta) I've found reason to want to link to a comment directly. I'd imagine something as simple as making the date / time stamp an anchored link which mimics the behavior of the question link.

share|improve this question
    
Ironic that this should be status-declined now... –  Flexo Jan 30 '12 at 9:58
3  
Given: meta.stackexchange.com/questions/5436/… –  Flexo Jan 30 '12 at 9:58
5  
It's so weird when fanboys or people involved in something (people who make, use or support something) act like any questioning of the system or feature request, etc., is some kind of horrible attack and they knee-jerkingly attack the heretic who proposes it. I asked an accidentally duplicate question (I tried looking for "permalink"ing comments and didn't find it, so I made my own) and had the same kind of responses. But when they decide to go with it? Universal flip-flopping. In general, I don't like meta.stackoverflow because of this tendency to reject everything anybody says ever. –  vbullinger Mar 6 '12 at 17:36

6 Answers 6

up vote 46 down vote accepted

This appears to be officially supported now:

permalink to comments

Right clicking on the timestamp gives what looks like a stable URL:

http://meta.stackexchange.com/questions/5436/direct-link-to-a-comment/120688#comment319306_5436

share|improve this answer
    
It comes from the SE modifications user script. Have you installed that? –  ChrisF Jan 30 '12 at 10:56
1  
@ChrisF - nope, haven't installed that. Not seeing it on main either and chat.meta.stackoverflow.com/transcript/message/849109#849109 seemed to agree. –  Flexo Jan 30 '12 at 10:58
    
That is new then. –  ChrisF Jan 30 '12 at 10:59
    
I see that only on MSO and not on SO/SU. Is this a meta-only feature? I can imagine it being a little tricky if the comment thread were folded. (edit: ah.. just read the link to chat transcript) –  Shawn Chin Jan 30 '12 at 16:40
    
@ShawnChin It's enabled network-wide (though it's not as easy to tell on non-Meta sites due to the styling) –  Tim Stone Jan 30 '12 at 17:16
    
@TimStone doesn't work for me on SO, no matter how I poke it. –  Shawn Chin Jan 30 '12 at 17:21
    
@ShawnChin - I'm not seeing it outside of meta yet. I assume that means it's not made it that far on its rollout yet. –  Flexo Jan 30 '12 at 17:27
    
@ShawnChin Oh, weird...it's been enabled everywhere for me since last night, I even disabled all of my extensions to be extra sure (Since I had to update SEModifications to remove this feature). –  Tim Stone Jan 30 '12 at 17:29
    
Might also be I have a script cached with a long expiry for main –  Flexo Jan 30 '12 at 17:33
    
Ah well, I'll try again tomorrow. I'm in no hurry to use this feature. Just curious to see how it handles links to comments that have been folded. –  Shawn Chin Jan 30 '12 at 18:02
    
@ShawnChin It expands them, then brings you to the comment. That part's been in place for some time, if you go to your responses tab and click a link to a (hidden) comment on an answer, you should be able to see it in action. –  Tim Stone Jan 30 '12 at 18:18
3  
Cool. I now see it on the other sites as well. –  Shawn Chin Jan 31 '12 at 10:09
    
"Right clicking on the timestamp"? Left click seems to work well. With FireFox, after a right click, you need to e.g. "Copy Link Location". –  Joseph Quinsey Jan 3 at 17:12
    
@jos yes right click - left click causes a whole bunch of network traffic and loses what I've typed into form controls in Firefox. –  Flexo Jan 3 at 17:56

FWIW, you can link to comments by combining the URL used behind the scenes to retrieve them with the internal ID for the specific comment:

http://meta.stackoverflow.com/posts/27319/comments#comment-57475

However, this relies on specific aspects of the current implementation, and there's no guarantee they won't change at some point in the future. Don't count on these links being permanent!

Or, even worse, combining the permalink of an answer (to ensure proper pagination) with the id of a comment, which however might not be shown on a page if there's too many comments, or if it's deleted (and hence would result in the page not scrolling at all):

Direct Link to a Comment

Links from the profile page currently use a slightly different format, where the comment ID has the answer ID appended to it (comment-<commentID>_<answerID>): comment-57475_27319 - this triggers a bit of client-side script that'll scroll to the proper answer and expand comments... So it works great, but again: very implementation-specific, so be wary of using this anywhere it has to keep working long-term (at least for now): if the format changes, this won't even be recognized by the browser as a valid ID.

For a userscript that'll make this easier, see the SEModification.user.js available here.

share|improve this answer
2  
Oh, that's rather... –  random Oct 26 '09 at 16:06
    
Interesting. But it takes the comment completely out of context. :) I'd hope to be able to link directly to this comment in the page flow. –  ahsteele Oct 26 '09 at 16:53
3  
If you know it's in the top n comments and will therefore be displayed by default on page load, you can use a similar hack: meta.stackexchange.com/questions/5436/direct-link-to-a-comment/… ...But this is even more likely to break, since it's quite possible for a comment to disappear off of the page (too many answers, additional, up-voted comments...) –  Shog9 Oct 26 '09 at 18:30
    
Actually: you currently know it's in "the top n" if it has at least one upvote. Hence, upvoting before linking might currently do the trick, like here... Still then: if the comment is deleted (or if the rendering is changed), the browser won't even scroll to the answer it might have belonged to. So: not really a permalink indeed. –  Arjan Sep 11 '10 at 11:09
    
Okay, I was wrong in my last comment too. Some posts may have too many upvoted comments, and then even hide upvoted comments... –  Arjan Oct 2 '10 at 9:57
    
It seems to me that permalinking to comments in the context of an answer would be possible if Auto expand comments of specific answer when browsing directly to that answer were implemented. Still then, deleted comments would not scroll the page at all, but show no error. Also, this might still not work for comments on questions. (And finally: if a comment is close to the bottom of the page, the browser might not scroll all the way down either.) –  Arjan Feb 8 '11 at 22:10
    
@Arjan: I think it's pretty safe to say that this will never be a well-supported use-case for SO. If you have something important and want to link to it, edit it into an answer (and, optionally, support in-answer anchors) –  Shog9 Feb 8 '11 at 22:51
    
@Shog9 how do I "combine the permalink of an answer (to ensure proper pagination) with the id of a comment" ? I want to link to japanese.stackexchange.com/questions/3223/… (as you can see there's too many comments so it's linking to the wrong place) –  Pacerier Sep 25 '11 at 19:24
    
@Shog9 - Now (2011-09-26) that this is a feature - at least from the profile page - can we assume that comment links are permanent? –  Kevin Vermeer Sep 27 '11 at 15:01
    
@Pacerier: this appears to work a little better now... –  Shog9 Sep 27 '11 at 15:18
1  
@Kevin: The profile-page links are... a little bit different from those described here. I wouldn't necessarily depend on them being permanent, but you can probably trust them to at least get you to the right answer. –  Shog9 Sep 27 '11 at 15:20
    
@Shog9 ok I understand the hack now lol –  Pacerier Sep 28 '11 at 13:04

This would actually be really helpful for people who flag comments - being able to move directly to the item flagged.

share|improve this answer

I just can't see any legitimate need to deep link (permalink) to a comment.

Conceptually, they are too ephemeral compared to answers and questions. And on top of that, whether a comment is visible or not is completely dependent on how many other comments there are and how highly they are voted, among other variables...

Linking to the question or answer should be sufficient, I think.

edit: we do have a way to deep link to comments now, I believe -- I'll check and provide details.

share|improve this answer
    
Comments last only one day? :-P I disagree as Kip's answer clearly shows how linking to a comment would have helped you with your blog post. –  ahsteele Mar 30 '10 at 22:54
7  
You can’t see a reason to permalink to a comment Jeff? It sounds like you’re still thinking of comments as short, not-very-helpful, me-too/thanks type things. Perhaps you should take a look at some of the posts on Meta about comment-answers. Then maybe you’ll see a need for being able to link directly to comments. –  Synetech Feb 3 '11 at 13:46
    
Interesting that this has since been implemented. –  Lightness Races in Orbit Jun 23 '11 at 14:34
    
"I just can't see" Says the blind man.... Sometimes I get a response that appears useless except when in context of the comment thread. It's sad that I have to use the browsers search function once expanding comments to actually find the comment buried in what would appear to be a wall of text otherwise. –  Lee Louviere Jun 23 '11 at 15:02
    
@xaade we explicitly suppress comments and discussion; it's hard for a reason, like driving your car on the sidewalk is supposed to be hard. –  Jeff Atwood Jun 23 '11 at 22:57
    
Jeff did this recently get implemented? Seems like comments are now all expanded by default and that links from the activity page jump directly to comments. –  ahsteele Sep 10 '11 at 6:23
1  
@JeffAtwood: If comments were ephemeral (lasting a short time, is that really what you meant?) then why was the size of comments bumped up to 600 characters? If they are not supposed to be of any importance then why do something that gives them more importance? –  casperOne Nov 16 '11 at 17:40
    
No, Jeff was right. Comments were intended to be "ephermeral" (short-lived), are easily deleted, and can be removed by someone else by a simple flag. –  bobobobo Jan 30 '12 at 17:11
1  
Linking to comments in chat is useful. –  Lightness Races in Orbit Jan 22 '13 at 0:20

I agree, this has been a problem for me too a few times, mainly in meta-SO. It would have helped Jeff to link to me and TXI's bad joke in a recent SO blog post too! :)

share|improve this answer
    
See that alone should seal the deal. ;) –  ahsteele Jul 15 '09 at 3:56
1  
linking to the post is sufficient-ish -- comments are right there under the post –  Jeff Atwood Mar 30 '10 at 23:24
3  
Answers are right under the question.... let's get rid of answer links. I was taught as a Customer interface designer, to put things where users look for them. It's not the producer that uses the product, it is the user. –  Lee Louviere Jun 23 '11 at 15:04

I was also looking for a neat way to get a link to a comment without digging in the page's source code or fighting with Firefox Web Developer Toolbar's Ctrl+Shift+F

I would suggest to make the timestamp part of the comment a direct link to the comment.

Something like this:

<span class="comment-date"><a href="#commentid">timestamp</a></span>
share|improve this answer
    
This won't help: (currently) not all comments might be loaded upon loading the page. Hence, the anchor of such direct link might not exist, leaving the browser no other choice than to not to scroll at all. In such cases, I think it's much better to at least link to a specific answer instead. (Apart from that: a permalink to a comment of some answer should also include the id of that very answer, to ensure the answer is shown to start with if there's paginated results.) –  Arjan Sep 11 '10 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .