The former originated largely as a religious movement.
It has its origins in Sirhindi, who voiced the view in 16th cen, that Akbar's policy was "Indianizing" Islam too much
Too much of Din-e-ilahi crap.
Let's keep Islam pure
That lineage continues in the thinking of 18th cen theologian Shah Waliullah , the Delhi based Islamic scholar who lived b/w 1703 and 1762
Waliullah like Sirhindi emphasized segregation/purity
and loyalty to the Ummah (the global Islamic whole)
Not to South Asian muslims per se
Waliullah once said
"Muslims, no matter where they live, they should be completely separated from the natives of that country in their culture, traditions and mannerisms. And wherever they are, they must be immersed in their Arabic splendor and Arabic trends”
This line of thinking continues in two 19th cen movements-
That of Syed Barelvi - who fought valiantly against Sikh rule in Punjab at Balakot
And that of the Deobandis in late 19th cen
The Khilafat movement's Ali brothers could be said to belong to this lineage
As well as figures like Maulana Azad and movements like Tablighi Jamaat
For them, the global muslim causes mattered more than South Asian muslim fortunes
So someone like Maulana Azad opposed Partition of India, because that would mean splitting the South Asian muslims into two. Not ideal
For the same reason, even Jamaat e Islami opposed Partition back in the 1940s. So did the Deobandis (if I am not wrong)
The modern Jamaat in Pakistan, and also fringe groups like AIMIM in India represent this school in South Asia today.
Emphasizing Islamic fundamentals. Not necessarily Muslim secular interests in South Asia
The other great branch in Muslim thought is more secular in character
This originates as late as 19th century in the figure of Syed Ahmed Khan
He was a "muslim modernizer", who supported the British in 1857
His obsession was more with "muslim interests" in South Asia. What will happen to Muslims in a Hindu majority subcontinent?
He did not think of Partition. But was focused on short run fortunes of Muslims in the wake of the great 19th cen Hindu ascendancy in civil services etc
He advocated even co-operation with the British, for this end, as he thought the Abrahamic and beef-eating Brits to be closer to Muslims in spirit than the Hindoos
He was not a fundamentalist, but a modernizer albeit religious
In his lineage, we have a different set of figures
People concerned with Muslim demographic in South Asia, and economic interests of Muslims
Not with Islamic purity per-se
In this branch we encounter Jinnah, the great Iqbal, Rahmat Ali, and men of that ilk.
You could say the military figures of Pakistan - like Ayub Khan, Yahya Khan, Musharraf represent this intellectual branch.
Now how does all this relate to the idea of Pakistan
We need to be clear that Pakistan as an idea emerged from the "Syed Ahmed Khan" branch. Not the tradition of Sirhindi / Waliullah
Syed Ahmed may not have thought of it. But it became a major agenda item for figures like Jinnah / Iqbal in early 20th century
Particularly after the great electoral setbacks of the mid-30s when Congress swept elections across the country
Today, Islamic revivalism / puritanism of the type that originated with Sirhindi 400+ years ago is represented in both India and Pakistan
But the Muslim nationalism of the type that emerged under Jinnah / Iqbal largely exists in Pakistan
Not so much in India
Both branches shared several things in common
For one thing - a strong antipathy towards Hindus
But the solutions were different in either case
The Islamic puritans were not BIG on partition
They preferred social segregation within an Indian federation
The Muslim nationalists, in contrast, were not content with segregation. Being more ambitious, they feared Hindu dominance in secular spheres
Hence the call for Pakistan