Running emacs in GNU Screen overrides .emacs settings for [home] key binding in FreeBSD 8.2
- by javanix
If I use the following .emacs file, I am able to go to the beginning/end of the current line using the home/end keys as I would expect.
(keyboard-translate ?\C-h ?\C-?)
(add-to-list 'load-path "/home/sam/programs/go/go/misc/emacs/" t)
(require 'go-mode-load)
(global-set-key [kp-home] 'beginning-of-line) ; [Home]
(global-set-key [home] 'beginning-of-line) ; [Home]
(global-set-key [kp-end] 'end-of-line) ; [End]
(global-set-key [end] 'end-of-line) ; [End]
However, if I open up a screen session it does not function like this (the [home] key still brings me to the beginning of the buffer for some reason).
Here is my .screenrc file if anyone can spot anything funky in there:
term xterm
defutf8 on
defflow off
startup_message off
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
#use bash as the default login shell
defshell -bash