Partly inspired by this post by Vilno I am writing about different aspects of nationalism-now here I seek to look a bit at the role history plays in nationalism. Observe the Low Countries from space-and how lacking it is is in natural borders. It is history not Geography that has created the nations and states that exist within it.
Partly this can be explored using the example Vilno gives Belgium. For a start why should the overwhelmingly Catholic southern Netherlands not have joined in the 1830revolt that created modern Belgium? Vilno I think rightly identifies history as the major reason. They'd been subjects of the Dutch state for centuries- and thus identified with it. -while a mere fiteen years had been the case for what's now Belgium.
I think there are other reasons Wallonia at least was experiencing enormous economic growth for example which would have aided self confidence (the legacy of Belgium's early industrialisation can be seen in a map of European railways-they're cantered on Belgium|. Over centuries loyalty had been given to a state in whose wars Dutch Catholics had fought. Meanwhile a modus operadi to their second class status had been set up(note the king of the Netherlands abdicated in part because marrying a Catholic was so unpopular!) - Dutch Catholics may have wished to change the status quo but they had adjusted to it. The same was not true of Belgium Catholics-indeed the Habsburgs had been much more intolerant of Protestants than the Dutch state was of Catholics. Thus it was a shock to become second class citizens-and they battled it fiercely.
Lastly I suspect history mattered another way- the Spanish Netherlands/Austrian Netherlands/south Netherlands/ Belgium had been the result of a massive Dutch gain in 1815- the south of the Netherlands proper was part of the Dutch patrimony-the core of the state the heartland . The Southern Netherlands by contrast was territory that had been acquired but was not central to part of the nation. It's notable that in public perception the former can become the latter (and the latter the former) one reason why Algeria was so divisive o long for France and then abandoned by 90%-even very rightwing and nationalist Frenchman no longer regarded it as of the heartland. In a sense it’s a kind of mental map of the land-which effects how hard people will fight for it. Mahinda Rajapaka’s mental map of Sri Lanka clearly includes the whole island- and for that he is willing to use the military to make this a living reality. If he and his electorate did not the reality on the ground would not exist.
Simple length of time a border has existed then is enormously powerful effect on national identify- because nationalism is to a certain degree the story people tell themselves about whose side they are on. However odd a border may appear it can work given enough time - German Belgium’s seem as far as I can tell quite happy with being Belgium-even though it is pure historic accident they are on the side of the border they are and they used to be violently opposed . Similarly a rebellion against grievances like the American (and if successful the Confederate one) can by providing a legacy of blood and enmity create a new nation.
There is also another way history can influence such decisions and that is much more subtle by the changes in what cleavages matter. Vilno emphasise the importance of the rise of literacy. I think that's part of the story but I would put it differently what matters is what matters for the operation of the state. So as the state rose in its impact what language it operated in mattered more and more (obviously the rise of literacy further helped expand this). Once you have government schools or government jobs-then what language they are in matters a great deal indeed it strikes me one explanation for the rise of Flemish nationalism post war is that the size of the Belgium welfare state. By contrast under the Austrians the language of the rulers (German) was barely used below the ruling council of the whole of Belgium (I'm not sure even they used German rather than Latin) - a set of civic and ecclesiastical bodies used a wide variety of languages as they saw fit the "German" nature of the state did not matter.
Again this is not a matter unique to Belgium. For example the Czechoslovakian government post World War 1 fired around half of its German civil servants because they failed an exam in Czech! If any one policy decision explains why the Nazis in Czechoslovakia were as popular among the German community as to be the biggest party not just among them but in the entire country that would be it.
Similarly where a state (however secular) continued to use religion as a marker for treatment then it could still stay as the ultimate marker. An example of this is the population transfers between Greece and Turkey after the Greco-Turkish war. The language of the treaty arranging the repatriations uses the "Christian religion " and the "Muslim religion" as markers-and indeed thousands of Greek speaking Muslims entered Turkey and thousands of Turkish speaking Christians Greece. Thus even though the Turkish regime was militantly secular religion remained a powerful marker of the Turkish state- unless you are broadly "Muslim" (under a broad definition that includes Muslim atheists and Alawites) then it is very difficult to be Turkish however secular you or your government are.
Finally another historical issue that matters is confidence and feelings of strength. Flanders was the poor backwater of Belgium in the 19th and early 20th century-by the post war era they're superior growth led to a huge surge in Flemish confidence that in turn helped precipitate the surge in nationalism.