In logic, a fallacy is not a false belief but a pattern of reasoning that is both typical and in some way specious. Specious reasoning, by the very etymology of the term, appears correct but is not. Thus a fallacy is not just any old mistake in reasoning, but a recurrent mistake that is seductive. A taxonomy of fallacies is useful insofar as it helps prevent one from seducing oneself and being seduced by others.
Second example. A: "Nowadays all chess players use algebraic notation." B: Not so, Ed Yetman does not use algebraic notation. He uses descriptive notation exclusively. A: Ed Yetman? You call him a chess player?!"
Third Example. A: "When a complete neuroscience is achieved, we will know everything about mind, brain, and consciousness." B: "I can't agree, even a completed neuroscience will not explain how consciousness arises from brain activity." A: "A neuroscience that can't explain consciousness would not be a completed neuroscience."
Fourth Example. A: "Theism ought to be combatted because theists have murdered and suppressed millions." B: "If so, then by the same token atheism should be combatted because in the 20th century alone atheistic Communists murdered 100 million people, suppressed even more and destroyed countless churches, synagogues, mosques, and temples." A: "But those murderers and destroyers are not true atheists, they don't represent us!"
Clearly, something has gone wrong in these examples. Person A is making an illicit dialectical move of some kind. The general form of the mistake seems to be as follows. Person A makes a universal assertion, one featuring a quantifier such as 'all,' 'no,' 'everything' whether explicit or tacit. Person B then adduces a counterexample to the universal claim. Person A illicitly dismisses the counterexample by modifying his original assertion with the use of 'true' or some equivalent designed to exclude the counterexample.
The fallacy is informal since the fallaciousness depends on the content or subject matter. So we need to ask: When is it not a fallacy? By my count, there are three classes of cases in which the No True Scotsman move is not fallacious.
1. When the original assertion is either a logical truth or an analytic truth. If I point out that all bachelors are male, and you reply that your sister Mary is a bachelor, then I am justified in dismissing your 'counterexample' by saying that Mary is not a true bachelor, or a bachelor in the strict sense of the term.
2. When the original assertion is synthetic but necessary. If Saul Kripke is right, 'Water is H2O' is synthetic but necessary. If I say that water is H2O, and you object that heavy water is not H2O but D2O, then I am entitled to respond that heavy water is not water.
3. When the original assertion involves stipulation. Suppose Smith defines a naturalist as one who denies the existence of God, and I respond that McTaggart is an atheist who is not a naturalist. Have I shown that Smith is wrong? Not all. Smith may respond that McTaggart is not a naturalist as she defines the term. Wholly or partially stipulative definitions cannot be said to be either true or false although they can be more or less useful for classificatory purposes. Second example. Suppose Jack claims that libertarians favor open borders and Jill responds by adducing the case of libertarian John Jay Ray who does not favor open borders. Jack is within his epistemic rights in saying that Ray is not a full-fledged libertarian.
Exercise for the reader: Provide more examples!