How close to training should you eat?
Because fats are slow to digest, if it's less than 1 hour before training then just stick to faster digesting carbohydrates and faster digesting proteins. The fastest digesting proteins you can eat are Whey Proteins. The fastest digesting carbohydrates are Pure Dextrose and Pure Maltodextrin – but I wouldn't recommend these carbs for everyone. If your goal is weight loss focussed, then if you have to eat close to training, sticking to a protein shake is usually best.