This is a really good question and the answer, from an emissions perspective, is - no, not necessarily. Let's break it down in to two categories, food that's in season in your area and food that isn't.
Food is in season locally
If a food is naturally in season in your country or local area, there is no reason to think it has been grown in artificial conditions (such as a heated greenhouse). In this case, production emissions can be assumed to be similar to elsewhere in the world, and therefore buying local produce reduces food miles - minimising total footprint.
So if in season - buy local!
Food is not in season locally
It gets more complicated when the food is not in season. The emissions released from growing fruit and vegetables in artificially heated environments, is usually far higher than the emissions from shipping in the same food type, that's been grown in natural conditions, from overseas. See this article about tomatoes grown in Sweden as an example. This can change when the food is flown in from abroad as air freighting has far higher emissions than shipping (can be as much as 100 times as much). Food is flown when it has a short shelf life and cannot spend the time on a cargo ship, such as berries, asparagus, pineapples, spring onions, lettuce etc.
So if out of season - buy wherever it has been grown naturally, unless you think it has been air-freighted.
The problem is of course - we don't always have this information. As consumers we our supermarkets to be more transparent about how their produce is grown and how it has been transported, so we can make more informed decisions. Hopefully Snowball can help drive this change in the future (watch this space!).
Hope that's helpful, if not a straight forward (or short...) answer!
Jon