My favourite Empathy feature no-one knows about

Picture the scene. You’re painstakingly composing a lengthy message…

…when you manage to close the tab by accident (maybe you hit Ctrl-W after too many years using a terminal? or maybe you thought your browser was focused?). You hammer your keyboard in frustration: your beautiful prose is gone forever. But wait! What’s this lurking in the Tabs menu?

Not only does it reopen the tab you just closed, but the message you were composing is remembered, too. Crisis averted!

The keyboard shortcut is Shift-Ctrl-T, just like in many web browsers (which inspired this feature). As a secret bonus feature, the keyboard shortcut works in the contact list, too, to rescue you when you’ve closed the very last tab by accident. Empathy remembers the last few tabs, not just the most recent.

Of course, if you don’t know the super-secret contact list shortcut, you can go find the contact in your contact list again: Empathy should still have remembered the message you were typing. (Right now it doesn’t persist across sessions; a patch to add that would be most welcome!)

Undo Close Tab has been around for a while; remembering the half-written message was added in Empathy 3.1.2, so it’s coming soon to a GNOME 3.2 near you! Thanks, Jonny.

15 comments ↓

#1 Bastien on 09.06.11 at 1:47 pm

That’s adolescent Jonny to you.

#2 Leif on 09.06.11 at 1:47 pm

Very nice.

This would be a great feature in GTK to have for any tabbed window (gnome-terminal, epiphany, etc).

#3 Alexandre Franke on 09.06.11 at 1:48 pm

This is teh awesome. Accidental tab closing happens more often than one can shamelessly confess.

#4 John McHugh on 09.06.11 at 2:32 pm

Wouldn´t it make more sense to just open recently closed tab when the user initiates a chat with a contact they were just talking to rather than have two different mechanisms for initiating a chat.
Either way, this feature is awesome and looking forward to it.
One more feature which would make 3.2 release rock is if the ´join a new chatroom´ feature was exposed in the chat screen as well as the contacts screen.
Its annoying having to select the contact screen when nickserv steals focus to open another room only to have to go back to the contact screen again when the chatroom I last joined steals focus, only to have to go back to the contact screen again to open new rooms only to have the process annoy you to the point that its become such a pain in the ass that you have become slightly less social.

#5 dbrodie on 09.06.11 at 2:57 pm

This is probably not the place to say it, but as nice as that feature is, I much prefer the way it is implemented in the N900.

Basically if you close the messaging window of a user in the middle of written a message and open a messaging window of the same user (even after a phone reboot) you will have your message in the text box.

#6 Michael Banck on 09.06.11 at 3:35 pm

Wouldn’t it make sense to keep the text referenced, so if I accidently close the tab, and then restart the conversation, the text is still there?

Skype does this, IIRC.

#7 Robin on 09.06.11 at 3:56 pm

Happened a few times to me too, the urge to press Ctrl+W is just too big sometimes.

I guess it would help if Ctrl+Backspace would also delete a word in gnome-terminal.. /me goes to have a look at his ~/.zshrc

#8 Will Thompson on 09.06.11 at 4:07 pm

John, dbrodie, Michael: that’s exactly what it does do. When you reopen the tab (whether by using Undo Close Tab, or by just finding the contact and double-clicking them), the text you were typing is still there.

John: you can use /join in chat rooms, if that helps!

#9 Robin on 09.06.11 at 4:08 pm

Reply to self: Turns out Backspace and Ctrl+Backspace send the same keycode in gnome-terminal, so there’s no way to remap it: https://bugzilla.gnome.org/show_bug.cgi?id=420039

#10 dbrodie on 09.06.11 at 6:25 pm

Ah great! Thanks!

#11 Sumana Harihareswara on 09.06.11 at 10:43 pm

I laughed aloud at your screenshots and interlocutors. Thank you.

#12 Higginbotham on 09.20.11 at 2:16 pm

I’m not surprised nobody knows about it. Undo (whether Close Tab or any other action) belongs on the Edit menu, with the shortcut Ctrl+Z.

#13 Will Thompson on 09.20.11 at 2:26 pm

If Ctrl-Z did anything in Empathy chat windows, it would undo the last change you made in the text entry.

If the menu item was relabelled to “Reopen Chat with Jane” (which I think would be better anyway), would you still think it belonged in the Edit menu as opposed to the Tabs menu?

#14 Toddi on 09.29.11 at 5:46 pm

I’m not keyboard savvy in any way, so I had to try to see what ctrl + w did. At first I thought it was some kind of window switcher, but far too late did I realizer what it did. :/ I ended up closing all my windows. :(

#15 Will Thompson on 09.29.11 at 6:13 pm

Doh! But then you pressed Ctrl+Shift+T repeatedly and restored them all, right?