Simplistic explanation of CO2 production variations between coal and other hydrocarbons -
All hydrocarbon combustion processes react both carbon and hydrogen with O2 to generate energy.
The Carbon reaction creates CO2, the Hydrogen H2O (ideally).
But these fuels vary in their proportions of C and H
Coal - lots of C, little H, so plenty of CO2 per unit energy.
Natural Gas - little C, lots of H, so less CO2 per unit energy.
Liquid hydrocarbon fuels are in between.
The largest hydrogen sink on the planet is its water, which is about 11% hydrogen. But breaking it out takes much more energy than its energy content as fuel. Gasoline, on the other hand, is more than 15% hydrogen, one of the most hydrogen dense compounds in existence. Even if we do change to a hydrogen economy, I suspect that the fuel vector will be gasoline. We certainly have the technology to use superclean gasoline as a fuel cell fuel. And when we run out, we will make more, as this article suggests.
I think the evolutionary path is through hybrid vehicles with on-board electricity generation, eventually combined with an ability to use externally supplied electricity, perhaps in towns or on major intercity routes. Using externally supplied electricity versus manufacturing fuel is far more efficient.
No, I don't know how to get all of this done, but perhaps some of you younger engineers can figure it out.