Bananas work for me the only problem, bouncing round on or in your backpack -they turn into pudding around 1030 if not protected; energy bars taste like processed cardboard, too much sugar and taste godawful. Beware the ubiquitous bocadillo, that lovely and widely available sandwich, processed white flour baguette, full fat cheese, a bit of ham (ok once in a while maybe) or fried egg omelet, if you are lucky may have salami or such. White bread, lettuce and tomato won't give you much energy though. There are lovely half litre containers of yoghurt and fruit in any tienda may try that.