The following sentence seems incorrect to me, but I am not entirely certain:
We were thinking of holding a meeting next Tuesday.
It is correct.
Although using the phrasal thinking of may be somewhat less formal than an infinitive planning to, it is not ungrammatical to do so.
A very basic mapping of the sentence is as follows:
We - were thinking of - holding a meeting next Tuesday.
Sub Verb Phrase Object (Gerund Phrase)
Others may not consider thinking of as phrasal, and consider the second half of the sentence as a prepositional phrase. This is still allowable since gerund phrases function as nouns
We - were thinking - of (holding a meeting next Tuesday).
Sub Verb Phrase Prep + Noun Phrase (Gerund Phrase)
It is correct. There is nothing wrong with its grammar.