The concept of planning meals ahead of time is not a new one, but well worth reminding ourselves of. Rushed, unplanned events are usually when I get caught out. What you should do is identify when you are getting caught out (ie trying to find lunch in a dairy, or at a store only selling crap) and aim to plan a little better next time.