A reference to the coincidence of someone who appears unexpectedly while being talked about.
The phrase is the short form of the idiom, “Speak of the devil and he doth appear.” It’s used when an object or person being discussed unexpectedly becomes present during the conversation. It can also be used about any topic that suddenly becomes relevant.
The proverb arose in the Middle Ages, and was a superstitious prohibition against speaking directly of the devil or of evil in general, in case that caused either one to appear and create unfortunate consequences. Its first printed usage in modern English was in Giovanni Torriano’s Piazza Universale (1666), as “The English say, Talk of the Devil, and he’s presently at your elbow.”
It also appears in ‘Cataplus, a mock Poem,’ 1672 – re-printed in Hazlitt’s Proverbs:
“Talk of the Devil, and see his horns.”
This prohibition was so strong, that many synonyms for the devil were coined, such as Old Nick, Prince of Darkness, the Horned One, Satan, Beelzebub, Lucifer, Archfiend, The Evil One. Openly speaking of the devil or the occult was thought, at the very least, unlucky. It is, in essence, a warning against curiosity about evil in general.
The phrase lost its warning message during the 19th century, during which it became a caution against eavesdroppers (“No good of himself does a listener hear, / Speak of the devil he’s sure to appear”) and, by the 20th century, had taken on its present meaning. It’s now merely a light-hearted way of referring to a person’s (perhaps) unexpected appearance.
But there is still a fear of acknowledging evil by name, which we see in the Harry Potter series, where only the bravest characters will call Voldemort by his name.
One form of an allied phrase is ‘the devil finds work for idle hands,’ indicating a belief that people who have nothing to do are likely to get into trouble. A similar form is ‘Idleness is the root of mischief,’ which can be traced back to Chaucer’s Tale of Melibee (c. 1386).
I’m too busy to have idle hands, but I can still get into trouble, and without mentioning you-know-who either!