Not very far without risking damage. It would depend on the mixture. Lets say you had one gallon of gas and 20 gallons of diesel. You might make it through and just need to replace the fuel filter. I would think much more than that and you are left along side the road. Not a good idea to mix.
Mixing the two is not a good idea. The diesel engine would ignite prematurely which can cause internal damage to the engine. Damage may also occur in the fuel pump and mess up the fuel injectors.
Gasoline is a by product left over from when diesel was made. In the beginning this by product was just dumped to the wayside.