Stuff happens, and when the "gurgle-gut" begins I make haste. Now, especially in an 'emergency situation', time and distence are key and dictate how much 'care' is taken behind closed (stall) doors. Most often, reguardless of the gut-pain I may be in, I'll close said stall door, address the great white round one while unbuckeling, and either place my sidearm on the oversized TP dispenser OR tuck it under my left armpit. I always use judgement when placing a firearm somewhere off my person, and the proximity of my sidearm WRT the porcelain goddess is calculated into this equation......don't want to feed the 'round-wet fileing cabinet' my EDC while completing the required administrative paperwork.
I carry IWB most of the time. It's a simple, quick evolution to place the sidearm underneath my left armpit while on-site business is/must be conducted. This, by far, is my perfered method of securing my EDC.
I have NEVER used the coat hooks on a stall door and STRONGLY recommend NOT applying that option. In the throws of relief after voiding your colon, a ND will occur due to the 'lightened' senses of your said relief while retriving your weapon. The ONLY object placed in the trigger guard is YOUR booger hook and NOTHING else! A round discharging will, in the least, raise the 'pungent state' of the immidiate area and get you a ride downtown for more admin paperwork.
Now, if for whatever reason, the above two options arn't availiable to me.....I simply unholster and place my sidearm in the 'basket' of my britches while down in the 'ankle' position.
Hope this helps.