Yeah, you really need to plan ahead and expect this stuff when choosing a parking spot.
When parking with other cars I try to get as close to the other cars' passenger door on my left, because virtually no one nowadays drives with 2 people in a car. This gives you a little more buffer room for the car to your right to swing open his drivers door without having to whack your passenger door.
Also I try to barricade my passenger door against walls, or planters, and for last resort I take up 2 parking spots when necessary. Hope this helps.