How can change this behaviour:
C-s— start incremental search- type
word— misprint the last character - Backspace — Oops! incremental search disappears, and I actually delete 1 character from the buffer.
to that one:
C-s— start incremental searchword— misprint the last character- Backspace — delete the last
dcharacter - type
k—work— correct, and continue the search
I run Emacs in text terminal via SSH in PuTTY.
Operating system version: 2.6.16.60-0.58.1.1882.3.PTF.638363-smp #1 SMP Wed Dec 2 12:27:56 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
Emacs version: GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.14.6) of 2010-07-16
With the -q option, Backspace sent by PuTTY is just C-h, and it acts like C-h, but in my .emacsfile I it bind to delete-backward-char:
(global-set-key [(control h)] 'delete-backward-char)
What you should do is configure PuTTY to send
C-?(byte 127) for Backspace instead ofC-h(byte 8). This is the setting that works best in most circumstances. See thePuTTY manual.
If you changed the PuTTY setting to send
C-hbecause some other application didn’t work, check that your terminal settings are correct on the server. The setting is often correctly autodetected, but sometimes you may need to addstty erase '^?'to your shell configuration file (.bashrcor similar) on the server.If you really absolutely have to have Backspace send
C-h, then globally rebindingC-hisn’t sufficient. Instead, add(normal-erase-is-backspace-mode 1)to your.emacs. See the Emacs manual.