You are not logged in.

#1 2011-12-20 11:25:49

Tillotson
Member
Registered: 2009-05-09
Posts: 23

Emacs and urxvt [solved]

I'm trying to get the backspace key working properly. According to describe-key:
The backspace key gets interpreted as C-d

If I run the following elisp:
(global-set-key "\C-d" 'delete-backward-char)

Then the backspace key works properly but C-d is also affected.

Anyone have a way around this?

Versions:
emacs 23.3.a-3
rxvt-unicode 9.12-2

Last edited by Tillotson (2011-12-20 21:07:11)

Offline

#2 2011-12-20 16:17:38

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Emacs and urxvt [solved]

Sounds like your $TERM might be wrong, urxvt sends ^? by default, not ^D


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2011-12-20 17:07:21

Tillotson
Member
Registered: 2009-05-09
Posts: 23

Re: Emacs and urxvt [solved]

I don't think so.

[tillotson@pinkie ~]$ echo $TERM
rxvt-unicode-256color

I don't really know much about terminfo etc but this might explain some things:

[tillotson@pinkie ~]$ infocmp | grep kbs
    kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs, kcbt=\E[Z,
[tillotson@pinkie ~]$ infocmp | grep "\^D"
[tillotson@pinkie ~]$ infocmp | grep "\^H"
    csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
[tillotson@pinkie ~]$

Offline

#4 2011-12-20 17:29:18

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Emacs and urxvt [solved]

Do 'C-v <backspace>' in urxvt and see what it sends.

Last edited by Mr.Elendig (2011-12-20 22:36:57)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2011-12-20 17:56:04

Tillotson
Member
Registered: 2009-05-09
Posts: 23

Re: Emacs and urxvt [solved]

Yea, it returns  "^?". Weird.

Offline

#6 2011-12-20 21:06:44

Tillotson
Member
Registered: 2009-05-09
Posts: 23

Re: Emacs and urxvt [solved]

After much googling I found:
http://www.delorie.com/gnu/docs/emacs/emacs_512.html

(normal-erase-is-backspace-mode 0)
Fixes the issue for me.

Thanks for the help.

Offline

Board footer

Powered by FluxBB