Common sense might suggest that "patriotism" and "nationalism" are synonymous, but the idea that they are two different things, the latter worse than the former, goes at least as far back as George Orwell. There's a fresh impulse in the U.S. to distinguish between good "patriotism" and bad "nationalism" given the perception of President Trump, or some of his advisers who appear to be losing influence, as "nationalists." As the invocation of Orwell in E. J. Dionne's recent column suggests, a debate over the 21st century direction of the U.S. is being shaped by the terminology of the 1940s. Dionne writes that "nationalism rankles," meaning that the word "nationalism" rankles, "partly because of the evils of Nazism and Fascism." Just as some people try to tie the modern left to Nazism because the Nazis were the "National Socialist" party, so nationalism becomes suspect in some eyes for the same superficial reasons. Nazism seems to have shaped Orwell's understanding of what "nationalist" meant. Dionne quotes from "Notes on Nationalism," an essay Orwell wrote in 1945. "Nationalism is not to be confused with patriotism," the great man writes, with the emphasis in the original. The distinction he makes between the two boils down to this: patriots and nationalists alike believe that theirs is the best country or culture in the world, but the nationalist, apparently unlike the plain old patriot, adopts an amoral "my country right or wrong" attitude committing him to ruthless advancement of his country's interests in a zero-sum competition of nations. Nationalism, for Orwell, is a violently aggressive mutation of patriotism "inseparable from the desire for power." By comparison, while Orwell can imagine a "purely negative" nationalism defined entirely by hostility to some entity, "patriotism is of its nature defensive, both militarily and culturally." This patriotism may be just as chauvinistic in essence as nationalism, but it doesn't seek to impose itself on other nations or cultures. Dionne doesn't mention this distinction, perhaps because he realizes that it might confuse his Orwellian analysis of contemporary American politics. The so-called "nationalists" in Trump's circle seem to be the ones taking a more defensive than aggressive stance, concerned mainly with defending the nation from threats from without (free trade, immigration, Islam) while disclaiming any intention of imposing American values elsewhere. They seem to be the ones who sought better relations with Russia and Syria, a desire critics attributed to some sinister "nationalist" ideology they shared with Russia's leadership. But to the extent that the "nationalists" are the "isolationists" in Trump's camp, they seem more like Orwell's "patriots" than his malevolent "nationalists."
In reality, Orwell's distinction between defensive patriotism and aggressive nationalism isn't very relevant to the current debates over "nationalism." We get nearer the heart of the matter when Dionne, a liberal, approvingly cites Republican writers who call contemporary nationalism "a demagogue's patriotism" and "ultimately the fire of tribalism." They aren't really criticizing "nationalism" as such -- I was taught in school that the idea went back to the 19th century resistance to Napoleon and his revolutionary ways -- but something that usually gets a modifer like "ethno-nationalist" or, in the worst case, "white nationalism." In other words, "nationalism" in today's politics denotes a presumably bigoted patriotism dedicated less to nation than to that segment of the people that sees itself as the exclusive embodiment of nation. By comparison, Dionne prefers a propositional patriotism. "Ours is not a loyalty to blood or soil," he writes, "It is an embrace of a series of powerful propositions" that no one on earth is innately incapable of adopting. For him, then, nationalism is the idea that those propositions are the exclusive birthright of a specific group of people, either unavailable or fundamentally incomprehensible to others. Take that as you will, but I don't really find it useful to make the distinction Dionne and others insist upon between "nationalism" and "patriotism" because "patriotism" should not be equated even implicitly with any ideology.
This debate over "nationalism" looks like just another way to talk about "populism." Orwell himself wrote that he used "nationalism" for want of a better term to describe attitudes held by groups other than nations, and Americans may use it now because "populism" doesn't seem to be the better term. But "nationalism" as contemporary Americans describe it in discussions of the Trump movement bears a lot of resemblance to "populism" as I understand it. Both terms refer to what academics might call an embodied patriotism, not necessarily "blood and soil" but definitely "flesh and blood." Establishment liberals and conservatives alike are having trouble addressing a fresh expression of patriotism or nationalism that insists that the national interests are not abstract concepts but the material interests of actual people. Liberals mistrust this insistence because it seems inseparable from those actual people's prejudices, while conservatives worry that it's unconstrained by constitutional or ideological scruples. Portrayed as extreme, this movement occupies a conceptual middle ground between libertarian individualists who feel no special solidarity with anyone and those universalists who don't see national borders as reason enough to show more solidarity with people within those borders than with people outside. In the long run, the really noteworthy thing about this phenomenon is its departure, in some ways, from the dogmatic individualism that defined American conservatism in the Cold War era, most notably in its preference for protectionist trade policy, on the assumption that no loss of American jobs is acceptable, over free trade principles. Establishment conservatives probably see this "nationalism" as collectivist in some obnoxious way, while establishment liberals see this renascent collectivism as "nationalist" in a pejorative and even more obnoxious way. What seems indisputable is that the very word "nationalism" makes a wide range of ideologues deeply uncomfortable. Whatever you think of the "nationalists" themselves, this discomfort is probably a good thing.