Fruit
Fresh fruit is a real treat on the trail--if you can keep it from bruising. Oranges travel particularly well; apples, pears and especially bananas must be treated very carefully. Dried fruit is an easier option. It won't go bad if you don't get to it right away, it does not have pits or cores to go to waste, and it won't turn to mush if heavy gear gets stacked on top of it.
Nuts, Seeds and Granola
Nuts, seeds and granola are the basis for a fine trail-side snack mix. Add in tidbits of whatever catches your fancy--chocolate and dried fruits are both popular--and you've got an energy-rich snack that travels well. You also can cook these staples into your own energy bars.
Meat
Most canned meat is pre-cooked, and because it's been canned, it does not require refrigeration. A can of tuna on its own might not be appetizing, but if you're familiar with local flora, you can rustle up some wild greens or even bring a few pre-cut greens from home to spice up your meal. Make sure you get the flip-top cans so you don't need to pack a can opener. Your other meat option is jerky. Beef is not the only dried meat you'll find nowadays. Game meats, fish and even turkey jerky can be found in many grocery stores.
Greens
Chop fresh vegetables at home and store them in snack-size bags. They'll travel relatively well on the trail in cool weather; in freezing weather, tuck them inside your jacket to help keep them from freezing. If you're sure about what's safe to eat, harvest wild greens on the trail. Some greens, like nettles, must be cooked to be edible, but many, like plantain, chickweed and dandelion, are easy to identify and can be eaten raw.