In a perfect world, who wouldn't buy pesticide free, lovingly raised, organic, local food if it was available, tasty, and cheap? Instead, we have to pick our way through high prices, confusing advertising, and our long-indulged taste for foods that aren't in season. (Strawberries in January, anyone?)
So you have to decide what matters most. Which is better, locally grown or organic? Should I eat less animal products or buy a brand that assures me that the animals are well treated? How am I supposed to know?
I've seen evidence for the claim that what you eat is more important than how it gets to you.
According to the authors of this paper from the Journal of Environmental Science and Technology, "[greenhouse gas] emissions associated with food are dominated by the production phase." (Italics are mine.) It's no surprise that it takes a lot of energy to raise and transport red meat. But I've never seen anyone compare the impact of buying local to the impact of eating less red meat.
I'm a vegetarian. I've been one for about twelve years. But if the authors of this paper are correct, you don't have to be a vegetarian to decrease your food footprint. Simply shifting your diet so that you eat less red meat and dairy products (about one day's worth of calories less) makes more of a difference than buying all locally grown food.
(As far as I'm aware, the jury's still out on the environmental impact of lab-grown meat.)
The Center for Science in the Public Interest has this neat calculator that gives you an easy way of estimating the impact that diet changes could have on your energy use.