When are question titles auto-expanded?

Sometimes, pasting a link into the text auto-expands to the question title, and sometimes it doesn't. For example, to take a question transitively suggested by the related links: Is there an explicit description of a cobordism between $\mathbb{CP}^n$ and $\mathbb{RP}^n\times\mathbb{RP}^n$? . Well, in this case it auto-expanded to the question title, but it seems to me that it doesn't always. One option is simply to enter the question title manually, but (1) that's a pain, especially since MO already knows the question title, and (2) it is invalidated if the title of the linked post is updated (whereas I think that MO updates auto-expanded question titles—but I don't know how to test that without doing something naughty like changing the title of one of my questions just to experiment).

When is the question title auto-expanded? Is there any way to trigger this behaviour when it doesn't happen automatically?

(One situation where the question title isn't auto-expanded appears to be cross-SE links: https://physics.stackexchange.com/questions/552396/fluid-dynamics-for-the-sepiolite ; but I'm sure, although I can't dig up an example, that I've also seen it not being auto-expanded even on links within MO.)

EDIT: @GerhardPaseman's suggestion: How do these primes jump? . OK, it's auto-expanded in a question even with q in place of questions, and no slug.

• One possibility that occurs to me is that question titles may at least not be auto-expanded in comments. Let's test: mathoverflow.net/questions/231317/… . OK, it seems that that is at least one circumstance where it doesn't happen. Is there a way to trigger this (desireable, in my opinion) auto-expansion in comments? Aug 3, 2020 at 23:20
• Let's try it with a q instead of a questions. mathoverflow.net/q/243490 . Gerhard "Brevity Isn't Soul Of Autoexpansion" Paseman, 2020.08.03. Aug 4, 2020 at 0:02
• @LSpice There are some cases where the auto-expansion doesn't work, e.g., when the text is preceded by certain special characters, e.g., as asked about in the main Meta's <s>links</s> are autocompleted on preview but not rendered when posted. Aug 4, 2020 at 1:27
• @JohnOmielan, thanks! Aug 4, 2020 at 1:46
• There is this post on Meta Stack Exchange: What limitations does converting question links to links with titles have? It is relatively old, so maybe some of the information there is already outdated. Aug 4, 2020 at 4:58
• @MartinSleziak, so, in this MMO comment and (to pick a random example I saw) this MO comment, you were just manually cut-and-pasting the question title? Aug 5, 2020 at 11:31
• @LSpice To make it faster, I use a bookmarklet for that. Incidentally, I have mentioned it in a comment to the accepted answer to this question. Aug 5, 2020 at 12:20
• @MartinSleziak, sorry! I noticed that reference to the bookmarklet, but somehow it didn't register that you were the one who'd posted it. Thanks for your patience! Aug 5, 2020 at 15:41

When is the question title auto-expanded?

Whenever you link in a post (not a comment) to a question, i.e. a link starting with https://mathoverflow.net/q/ or https://mathoverflow.net/questions/, followed by a numeric ID, optionally followed by a slash and additional information. The question must not be deleted, and linking to answers doesn't work.

Links work within a site itself and from a main site to its meta and vice versa. Links from a meta site to Meta Stack Exchange and vice-versa work too.

Is there any way to trigger this behaviour when it doesn't happen automatically?

No, as you already mentioned, you have to copy the title yourself which is rather cumbersome.

whereas I think that MO updates auto-expanded question titles

The update happens automatically, but only if you edit the post with the link itself. At that moment, the Markdown ('source code') of the post is rendered and the system will take the current version of the title.

One final caveat: the question title expansion may work differently in the preview than in the resulting post: Either fix edit preview display to render bare links to more than five sites just like the post renderer, or convert all links ← that is proof that linking to Meta Stack Exchange works.