More as a reminder to myself: for some odd reason, the Terminal window in Panic’s otherwise most excellent Coda was giving me gyp with Emacs.
Please, by the way, don’t ask me why I’d still fire up an Emacs window in what’s effectively a very pretty modern editing environment with some surprisingly powerful tools built into it. It’s a combination of habit, long experience, and the need to interface with Subversion, among other things.
But I digress. I was having the Standard Emacs Backspace/Help problem, which is that hitting the “delete” key on my Mac keyboard was sending a control‑H character to Emacs, and Emacs was interpreting that as a call for help, rather than a hint that I wanted something deleted. This has been happening to people since Emacs has been mixing with text terminals.
Long story short, I tried to poke around with stty and tset and a few other things, but I couldn’t figure out why the Terminal window in Coda was any different from the normal OS X Terminal, which was behaving perfectly. I found that a quick “tset ‑e ^h” fixed the problem, but I also figured that the best thing to do would be to attack things from the Emacs side, so I did a bit of searching on the net, found the famous old page of the Emacs manual, and put this in my ~/.emacs:
(global-set-key "\C-h" 'backward-delete-char)
Job done. My delete key now worked from normal Terminal as usual, and also from within the Terminal in Coda. So, strange one, but an easy solution. If you don’t have a .emacs file, just create a new one in your home directory and shove the above line in it, and all should be well in Emacs in Coda.