2007-11-18 M-w kills Terminal.app no more

I hate it. Everytime I’m connected to a remote system via SSH, using Emacs, trying to copy something by using `M-w`, I close the window. GNU Screen is of limited help, here.

The above based on Disabling Quit and rewriting keyboard shortcuts.

Disabling Quit and rewriting keyboard shortcuts

Note that you need to use the *name of the menu*! English users will want “Close”, where as German users will want “Schließen”.

Another good candidate: Change the default Quit binding because `M-q` is used to fill paragraphs in Emacs. Hitting it by mistake and not only closing one Terminal window but all of them is super annoying.

AndrewCosgriff says:

“I don’t think I’ve ever been so happy to read something on a Monday morning at work! On 10.5, though, you need to use ’Close Window’ rather than ’Close’, and ’Quit Terminal’ rather than ’Quit’.” – Andrew.

Thank you so much for the System Preferences solution. Works like a charm. And you are right, I’ve decided to remap Quit as well. I don’t use `M-q` too often while working via SSH on remote servers because I’m usually writing Perl instead of Text. I guess that’s why I rarely ran into it. Better safe and sorry, and `⌘Q` got changed to `⌥⌘Q` (and `⇧⌘Q` was already taken). – Alex

​#Software ​#Mac ​#Emacs

Comments

(Please contact me if you want to remove your comment.)

Another way to avoid this is going to File → Window Settings.. and, in the Processes tag, remove ssh from the list of applications that don’t prompt before closing the window (and then set that as a default setting). You’ll still have the annoyance of dismissing the prompt, though.

– JoseAntonioOrtegaRuiz 2007-11-18 14:51 UTC

JoseAntonioOrtegaRuiz

---

I saw that you joined the Google Zürich office. Welcome to Zürich! Give my regards to Sascha Brawer if you see him. 😄

You solution would be better if I was training myself to no longer use `M-w`.

My solution is still suboptimal because `⌘W` is not translated to `M-w`. Oh well. 😄

– Alex Schroeder 2007-11-18 17:30 UTC

Alex Schroeder