Do food miles matter? The short answer: Not much, from a carbon footprint perspective -- with some exceptions such as fresh foods that are air freighted.
By way of illustration, here is a pie chart that shows the life-cycle greenhouse gas emissions of cooked potatoes broken down into key life-cycle stages. In this particular example, potatoes are grown conventionally in California. The raw potatoes are then transported 1500 miles in a refrigerated semi-trailer truck. Cooking steps include baking or frying in commercial kitchen equipment, followed by a steam table. Of the cooked potatoes, 20% are wasted and landfilled. The landfill is located in a temperate/wet zone, 50% of the landfill gas is methane, and 25% of methane is recovered and combusted as fuel. Transport contributes about 9% of the total life-cycle greenhouse gas emissions in this example.
These results shouldn't be surprising. A 2006 study from New Zealand (Saunders, et al) showed that it was important to look at the full life cycle of food products in order to optimize carbon footprints. That study found that several food products (milk, lamb, apples, onions) produced in New Zealand and transported to the UK produced fewer total GHG emissions than similar products produced locally in the UK.
In addition, we've seen cases where locally produced food is distributed inefficiently using small vehicles that transport the products hundreds of miles to farmers markets and other outlets. So replacing the long-distance supplier with a local supplier in the above example wouldn't significantly reduce the (already small) transport impact.
So is there any value to emphasizing locally produced food? There may well be benefits: taste, freshness, possibly lower risk of disruption/contamination, supporting local businesses, etc. But lower carbon footprint is generally not one of the automatic benefits.