The RIGHT way to do it-
1) you apply for it in conjunction with AOS just in case this stuff comes up.
2) In an emergency, you make an appointment at the district office and you bring proof of the emergency.
3) If your wife is too stubborn or ignorant to listen to you and prefers the advice of her friends and leaves anyway, be prepared to file an I130 petition in advance.
Absolutely agree, but something else to keep in mind when attempting #2:
Some local offices have different ideas about what constitutes an "emergency".
In our case, Lil's father had a heart attack. We went to Miami armed with originals and certified translations of affidavits from the cardiologist and the hospital administrator attesting to the fact that Papa was on his deathbed and may not make it through the week, let alone making a full recovery. Since Lil was able to speak at least two words of English, I was denied entry with her and required to wait outside. An hour later, she came out in tears. They had denied the request without even reading the evidence. I asked to consult a supervisor (who came outside rather than letting me enter the building). The woman let me explain the circumstance, read through the evidence, and exclaimed loudly "OHH! He ain't dead yet? Then it ain't no emergency! File it with Missouri" and waddled back inside.
I made an infopass appointment with the West Palm Beach satellite office two days later, and we were in and out in 20 minutes with the AP document in hand.
These two offices are 50 miles apart and run under the same director

In case anyone is curious why we didn't file with the AOS application... That same Miami office refused to take the I-131 as a concurrent filing with the I-485 and told my wife that it was against the law to file them in that manner, she'd have to wait for the I-797 receipt from her AOS petition before she was allowed to apply for AP (I had not been allowed into the building on that occasion either

)
Always scary when you know more than the people who are handling your case
