Subject: 24.3.50; emacsclient: emacs accepts keypress after server-edit before emacsclient exits

From: Gregor Zattler <[email-masked]>
Date: Tue, 05 Feb 2013 16:23:06 +0100

Dear Emacs developers,

I use mutt for emails and emacsclient to edit my emails.  When
I finished an email I do 

C-X C-S C-X # 

to save the email and exit emacsclient in order to go back to
mutts compose menu where I hit `y' in order to actually send the
email.  I'm trained to do so very fast and more often than not
the `y' ends in some random emacs buffer instead of in mutts
compose menu.  This is not annoing because I have to hit `y'
a second time, but because there are many buffers open and I have
to carefully examine if/which got borked.

Emacs obviously first switches to this other buffer and then
decides to exit the client.  In order to mimic an ordinary
command line application it would be better if Emacs first
checked if emacsclient should exit and do just that.

Thanks, Gregor