> You're suggesting I switch my mind and SCM state to this newly spotted thing, fix it, submit it and then come back?
I do this a lot. I have written, reverted and rewritten code sometimes even 5 times before I have been able to commit what I originally was planning to do (yes, I also create patches/branches when suitable). Some might think that I wasted a lot of time there, but every time I wrote the code, I learned something knew that allowed me to make better decisions.
> And even if it goes perfectly, have I been spending my time wisely? Was that newly spotted bug a high priority, urgent job, or a low priority, non time-critical job?
I have seen people spending weeks trying to fix a bug that was caused by a low priority bug they saw instantly, but didn't fix, because they wanted to fix the high priority bug first.
Quite often, fixing something that is very low priority can save millions of dollars for the project, but no-one can see the cost, because it is so well hidden. E.g. every time you add a new text, you have to write it into 4 different files, and sometimes it is forgotten and thus time is wasted both for writing it and then finding&fixing the bug it caused. This is a common hidden cost, caused by a low priority bug (duplication in source code, usually not even marked in the project bug tracker).
If you only fix what is the most important, be sure that you know what it is.