Damn web browsers! Damn web applications! Damn XEmacs!
I don't know who to cuss at! I was working merrily away on a reply to Charles Miller's post about the Mail.app spam filter. I was nearly done, just editing for brevity when BAM! The window disappears. "What did I just do?" I checked through all open windows. Nope. My reply to Charles was gone. Data lossage always sucks. But what did I do? (Please find the link to Charles' post in my rewritten reply. Grumble.)
I was typing into a <textarea> in Safari in Movable Type's New Entry form. One thing I like about Safari is I no longer have to cut-and-paste in order to check my spelling.
But then I hit the keystroke to copy some text. You know the one. Command-W.
The mac user asks "doncha mean Command-C?" The emacs user asks "doncha mean Meta-W?" If you use both, maybe you know my pain.
For those of you who don't: The Quartz window manager maps the Command key to Meta. So the Meta-W keystroke, which copies a block of text in XEmacs, is Command-W on an Apple keyboard. And Command-W is the keystroke which closes windows in MacOS. My fingers don't always make the transition from XEmacs key bindings to MacOS key bindings when I switch between apps.
If I had been using any text editor instead of a damn web browser to compose my reply I would have been prompted to save my work before closing it. But Safari merrily closed the damn window when I told it to.
I think I'll file that as a feature request: please make Safari smart enough to recognize a web form. Identify the window as unsaved if text is edited in any of the fields. Prompt the user for confirmation before closing a window containing an unsaved form.
But I will probably also go back to composing my blog entries in emacs and cut-and-paste them into Movable Type's form. If I get really ambitious I'll write an emacs module to submit new entries. Naw. Who am I kidding? It would be easier to switch to blosxom and just upload the entries.