0

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 1

1

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 hold Control then hit h
  • the key labeled Delete

(And just which keys are you using to get the behavior that does not work?)

3
  • 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 hit C-h and get the part I call "notepad", which says "This buffer is for notes you don't want to save...", then hit t and it just enters the letter into this buffer/"notepad". When running emacs -q instead, I end up at the same screen, except when I hit t it actually takes me to the tutorial. Customization suggestions is what I was hoping for.
    – sivanes
    Jul 28, 2014 at 0:46
  • and having done stty erase ^H, I can't surpass the buffer whether I run emacs or emacs -q. I can get rid of all the customizations and carry on, maneuvering around delete with some kind of M-b + C-d combos, but this is so odd.
    – sivanes
    Jul 28, 2014 at 0:54
  • 1
    Sorry, 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 why C-h just takes you to that buffer (and yes, in that buffer, t self-inserts). Try M-x describe-key RET C-h to see what command C-h is bound to. (Normally you would use C-h k to 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.
    – Drew
    Jul 28, 2014 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.