You are correct there situations where food appears not to pass through the stomach and is regurgitated.
Does it always follow the same pattern with the same food? If is does then this indicates a digestion problem; biochemical or a reaction, for examples.
If it follows an unpredictable cause then it may be a mechanical problem where the blood supple or nerves are interrupted. This is often accompanied by upper abdominal pain.
Tricyclic type antidepressants including amytriptyline prevent stomach emptying.