In this reaction (formation of ester from ketone / aldehyde), intramolecular proton transfer happens, since it can stabilize the formal positive charge by resonance after that. This transfer happens across 3 atoms. ($\ce{O-O-C}$)
However, in this step (formation of acetal from $\ce{C=O}$) using alcohol, the book says it does not occur, since the $\ce{O}$ and $\ce{H}$ are 'too far' apart. This 'transfer' happens only across 2 atoms ($\ce{C-O}$). Which is less than the above reaction ($\ce{O-O-C}$). If that can occur, why can't the proton transfer here not occur?
What is the real factor that determines whether an intramolecular proton transfer can happen?