People who say they never let their horses eat while riding are usually the ones who have a big fight on their hands. This shouldn't be a battle and the horse shouldn't be punished for trying to do what a horse does well, and that's eat! Instead we need to let the horse know that it is ok to eat when WE say it is. I always let my horses eat when I'm riding, they give me what I asked for and I reward them for it. I do this with my newest horse especially because he is very food motivated and it keeps the relationship strong when I say, "Thank you for the effort and cooperation, now you can grab a quick bite." Something for me, something for him.
So if a horse goes to eat when I didn't say it was ok I'll simply ask the horse to trot. That's it. I feel the thought coming so I just squeeze them into a trot and when I feel relaxation I go back to the walk. This uses psychology on the horse instead of us yanking on the horse or smacking him. Works every time.