Going through the tutorial on emacs, I got stuck on the deleting part, because by default DELETE key sends me to help. I've tried adding a few popular commands to the .emacs file such as (normal-erase-is-backspace-mode 1). So with that in my .emacs file, I hit C-h and get the screen that says This buffer is for notes you don't want to save..., then hit t and it just enters the letter into this "buffer". DELETE does what it's supposed to do now, though. When running emacs -q instead, I end up at the same "buffer" screen, except when I hit t it actually takes me to the tutorial, but the problem is of course that DELETE does not delete. Any solutions to this? I'm on a MacBook with OS X 10.9.4, using the Terminal.
1 Answer
The answer is in the Emacs manual, node DEL Does Not Delete. Just customize option normal-erase-is-backspace. Or use M-x normal-erase-is-backspace-mode to toggle the value.
Hmm, but I see now that you have added that you tried this. I do not understand what you mean by "notepad", so I do not understand that part.
Try this also, at a command prompt (assuming you are on GNU/Linux or similar):
stty erase ^H
And see various writeups on the web about stty erase. (IOW, google stty erase.)
When you say DELETE, I'm guessing (hoping) that you mean the key labeled Backspace and not the key labeled Delete. What does C-h k tell you when you use it and then hit each of these keys?
- the key labeled
Backspace C-h, that is, press and holdControlthen hith- the key labeled
Delete
(And just which keys are you using to get the behavior that does not work?)
-
by DELETE, I do mean the key labeled exactly as that, I don't have Backspace, I'm using a Mac. And yes, the
(normal-erase-is-backspace-mode 1)command I got from the page you linked. So with that in my .emacs file, I hitC-hand get the part I call "notepad", which says "This buffer is for notes you don't want to save...", then hittand it just enters the letter into this buffer/"notepad". When runningemacs -qinstead, I end up at the same screen, except when I hittit actually takes me to the tutorial. Customization suggestions is what I was hoping for.– sivanesJul 28, 2014 at 0:46 -
and having done
stty erase ^H, I can't surpass the buffer whether I runemacsoremacs -q. I can get rid of all the customizations and carry on, maneuvering around delete with some kind ofM-b+C-dcombos, but this is so odd.– sivanesJul 28, 2014 at 0:54 -
1Sorry, but I'm having a hard time following you (I don't know what you mean by "surpass the buffer" etc.). Hopefully someone else will be able to help more. FWIW: the "notepad" is buffer
*scratch*. I have no idea whyC-hjust takes you to that buffer (and yes, in that buffer,tself-inserts). TryM-x describe-key RET C-hto see what commandC-his bound to. (Normally you would useC-h kto do that...) It sounds like you have something in your init file that is messing things up. Try bisecting it (by commenting out 1/, 3/4...) to find what the culprit is.– DrewJul 28, 2014 at 1:11