[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs within screen
From: |
Pascal J. Bourguignon |
Subject: |
Re: emacs within screen |
Date: |
Mon, 14 Sep 2009 16:24:29 +0200 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux) |
alberto besana <alberto.besana@gmail.com> writes:
> When I launch emacs from screen some features like ctrl+<arrows> and
> comment colouring no longer work.
>
> My guess is that screen evilly interact on how emacs use termcap.
>
>
> EVIRONMENT VARIABLEs
> - emacs works fine when (no screen)
> TERM = xterm
> TERMCAP unset
>
> - bad behaviour
> TERM = screen
> TERMCAP = SC|screen|VT 100/ANSI X3.64 virtual terminal:\
> :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
> :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
> :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
> :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
> :li#44:co#143:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
> :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
> :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\
> :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
> :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\
> :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\
> :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
> :vb=\Eg:G0:as=\E(0:ae=\E(B:\
> :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}
> ~~..--++,,hhII00:\
> :po=\E[5i:pf=\E[4i:Z0=\E[?3h:Z1=\E[?3l:k0=\E[10~:\
> :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
> :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:\
> :F2=\E[24~:F3=\EO2P:F4=\EO2Q:F5=\EO2R:F6=\EO2S:\
> :F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:kb=:\
> :K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:*4=\E[3;2~:\
> :*7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:\
> :%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:@1=\E[1~:kH=\E[4~:\
> :@7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:ku=\EOA:\
> :kd=\EOB:kr=\EOC:kl=\EOD:km:
>
> I've got a bad behaviour (missing ctrl+d and End key) even when I
> cheat TERM = xterm and TERMCAP unset after entering screen.
>
> As you can guess it's very annoying.
>
> Any advice?
First, check your screen escape key. If it is one of the control
characters used by your terminal emulator to encode the End key,
chances are problems would occur.
I use Control-Z as screen escape. It's conveniently mostly useless
with emacs in screen.
Then, test if you can receive the code sequence from the missing key:
in the *scratch* buffer, when you type C-q End if you can see the code
sequence, then you can easily bind it to the original or any other
command:
M-x global-set-key RET End RET end-of-buffer RET
You can store that in your ~/.emacs
For example:
(unless window-system
(global-set-key "OF" (quote end-of-buffer)) ; End
(global-set-key "OH" (quote beginning-of-buffer)) ; Home
(global-unset-key "[")
(global-set-key "[15~" (quote set-justification-left)) ; <f5>
(global-set-key "[17~" (quote set-justification-center)) ; <f6>
(global-set-key "[18~" (quote set-justification-right)) ; <f7>
(global-set-key "[19~" (lambda()(interactive)(beep))) ; <f8>
(global-set-key "[20~" (lambda()(interactive)(beep))) ; <f9>
(global-set-key "[21~" (lambda()(interactive)(beep))) ; <f10>
(global-set-key "[23~" (lambda()(interactive)(beep))) ; <f11>
(global-set-key "[24~" (lambda()(interactive)(beep))) ; <f12>
)
--
__Pascal Bourguignon__
- emacs within screen, alberto besana, 2009/09/16
- Re: emacs within screen,
Pascal J. Bourguignon <=