* emacs and screen
@ 2011-04-06 20:25 Peter Keller
2011-04-07 2:20 ` Javier
2011-04-07 10:39 ` Richard Riley
0 siblings, 2 replies; 12+ messages in thread
From: Peter Keller @ 2011-04-06 20:25 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
debian squeeze box, I have run into a problem.
When running emacs -nw, not in a screen session, C-x C-<left/right>
rotates me between buffers. When running in screen, only C-x
<left/right> will rotate me between buffers. Having to lift up on the
control key to use the arrows is *very* annoying when rapidly moving
between buffers.
How can I fix this problem so under screen the C-x C-<left/right>
key combination works again? I have looked into both manuals, but
emacs should see the right key use, and screen doesn't make mention
that it messes about with C-x (well, without the escape sequence
being infront if it at any rate.)
Thank you.
-pete
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-06 20:25 emacs and screen Peter Keller
@ 2011-04-07 2:20 ` Javier
2011-04-07 4:11 ` Peter Keller
2011-04-07 10:39 ` Richard Riley
1 sibling, 1 reply; 12+ messages in thread
From: Javier @ 2011-04-07 2:20 UTC (permalink / raw)
To: help-gnu-emacs
I have also debian squeeze, and the behaviour is ok in the tty console,
but in an xterm I see the problem you describe.
Peter Keller <psilord@cs.wisc.edu> wrote:
> Hello,
>
> Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
> debian squeeze box, I have run into a problem.
>
> When running emacs -nw, not in a screen session, C-x C-<left/right>
> rotates me between buffers. When running in screen, only C-x
> <left/right> will rotate me between buffers. Having to lift up on the
> control key to use the arrows is *very* annoying when rapidly moving
> between buffers.
>
> How can I fix this problem so under screen the C-x C-<left/right>
> key combination works again? I have looked into both manuals, but
> emacs should see the right key use, and screen doesn't make mention
> that it messes about with C-x (well, without the escape sequence
> being infront if it at any rate.)
>
> Thank you.
>
> -pete
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-07 2:20 ` Javier
@ 2011-04-07 4:11 ` Peter Keller
2011-04-07 10:28 ` Valentin Plechinger
[not found] ` <mailman.5.1302172224.24221.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 12+ messages in thread
From: Peter Keller @ 2011-04-07 4:11 UTC (permalink / raw)
To: help-gnu-emacs
Javier <nospam@nospam.com> wrote:
> I have also debian squeeze, and the behaviour is ok in the tty console,
> but in an xterm I see the problem you describe.
Ah yes, my problem does occur in an xterm.
-pete
> Peter Keller <psilord@cs.wisc.edu> wrote:
>> Hello,
>>
>> Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
>> debian squeeze box, I have run into a problem.
>>
>> When running emacs -nw, not in a screen session, C-x C-<left/right>
>> rotates me between buffers. When running in screen, only C-x
>> <left/right> will rotate me between buffers. Having to lift up on the
>> control key to use the arrows is *very* annoying when rapidly moving
>> between buffers.
>>
>> How can I fix this problem so under screen the C-x C-<left/right>
>> key combination works again? I have looked into both manuals, but
>> emacs should see the right key use, and screen doesn't make mention
>> that it messes about with C-x (well, without the escape sequence
>> being infront if it at any rate.)
>>
>> Thank you.
>>
>> -pete
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-07 4:11 ` Peter Keller
@ 2011-04-07 10:28 ` Valentin Plechinger
[not found] ` <mailman.5.1302172224.24221.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 12+ messages in thread
From: Valentin Plechinger @ 2011-04-07 10:28 UTC (permalink / raw)
To: help-gnu-emacs
Screen interprets C-<arrows> as M-O a/b/c/d.
You could either change your .emacs to make those keys do the same as the arrow keys,
or change your .screenrc. I don't really use screen (tmux messed that up too though) that much so I'm not sure how to do that.
-Valentin
At Thu, 7 Apr 2011 04:11:52 +0000 (UTC),
Peter Keller wrote:
>
> Javier <nospam@nospam.com> wrote:
> > I have also debian squeeze, and the behaviour is ok in the tty console,
> > but in an xterm I see the problem you describe.
>
> Ah yes, my problem does occur in an xterm.
>
> -pete
>
> > Peter Keller <psilord@cs.wisc.edu> wrote:
> >> Hello,
> >>
> >> Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
> >> debian squeeze box, I have run into a problem.
> >>
> >> When running emacs -nw, not in a screen session, C-x C-<left/right>
> >> rotates me between buffers. When running in screen, only C-x
> >> <left/right> will rotate me between buffers. Having to lift up on the
> >> control key to use the arrows is *very* annoying when rapidly moving
> >> between buffers.
> >>
> >> How can I fix this problem so under screen the C-x C-<left/right>
> >> key combination works again? I have looked into both manuals, but
> >> emacs should see the right key use, and screen doesn't make mention
> >> that it messes about with C-x (well, without the escape sequence
> >> being infront if it at any rate.)
> >>
> >> Thank you.
> >>
> >> -pete
>
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <mailman.5.1302172224.24221.help-gnu-emacs@gnu.org>]
* Re: emacs and screen
2011-04-06 20:25 emacs and screen Peter Keller
2011-04-07 2:20 ` Javier
@ 2011-04-07 10:39 ` Richard Riley
2011-04-07 19:55 ` Peter Keller
1 sibling, 1 reply; 12+ messages in thread
From: Richard Riley @ 2011-04-07 10:39 UTC (permalink / raw)
To: help-gnu-emacs
Peter Keller <psilord@cs.wisc.edu> writes:
> Hello,
>
> Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
> debian squeeze box, I have run into a problem.
>
> When running emacs -nw, not in a screen session, C-x C-<left/right>
> rotates me between buffers. When running in screen, only C-x
> <left/right> will rotate me between buffers. Having to lift up on the
> control key to use the arrows is *very* annoying when rapidly moving
> between buffers.
>
> How can I fix this problem so under screen the C-x C-<left/right>
> key combination works again? I have looked into both manuals, but
> emacs should see the right key use, and screen doesn't make mention
> that it messes about with C-x (well, without the escape sequence
> being infront if it at any rate.)
>
> Thank you.
When going through a "minimalist" phase a year ago, I too used emacs -nw
in screen and/or tmux.
It's all down to termcaps and TERM setting and how emacs uses them.
I can only say : impossibly complicated and oodles of hackish
workarounds exists that require a lifetime of study to even begin to
understand.
I went back to emacs on X and haven't looked back ;)
On a more serious note, I sometimes uses emacs -nw still over ssh in a
screen but frequently key combos fail - most noticeably any Fn keys and
arrow keys,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-07 10:39 ` Richard Riley
@ 2011-04-07 19:55 ` Peter Keller
2011-04-08 14:49 ` Lake Shore Dr
0 siblings, 1 reply; 12+ messages in thread
From: Peter Keller @ 2011-04-07 19:55 UTC (permalink / raw)
To: help-gnu-emacs
Richard Riley <rileyrg@googlemail.com> wrote:
> Peter Keller <psilord@cs.wisc.edu> writes:
>
>> Hello,
>>
>> Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
>> debian squeeze box, I have run into a problem.
>>
>> When running emacs -nw, not in a screen session, C-x C-<left/right>
>> rotates me between buffers. When running in screen, only C-x
>> <left/right> will rotate me between buffers. Having to lift up on the
>> control key to use the arrows is *very* annoying when rapidly moving
>> between buffers.
>>
>> How can I fix this problem so under screen the C-x C-<left/right>
>> key combination works again? I have looked into both manuals, but
>> emacs should see the right key use, and screen doesn't make mention
>> that it messes about with C-x (well, without the escape sequence
>> being infront if it at any rate.)
>>
>> Thank you.
>
> When going through a "minimalist" phase a year ago, I too used emacs -nw
> in screen and/or tmux.
I'm not so much in a minimalist phase as someone I hack with likes
to pair program over an emacs -nw session in a screen on a machine
to which are are both ssh'd.
> It's all down to termcaps and TERM setting and how emacs uses them.
So, the quick and dirty problem (after debugging for a while) is that
screen, by default sets the TERM env var in shells inside of screen to
"screen". Emacs gets upset at this.
If you start screen like 'screen -T xterm', then the TERM variable
for all shells created in the screen is 'xterm' and emacs functions
properly with respect to C-x C-<left/right>. This makes me very happy.
I tried setting 'term xterm' in the .screenrc, but it didn't seem to
work, so a bash alias of "alias screen='screen -T xterm'" is sufficient
for me.
> I can only say : impossibly complicated and oodles of hackish
> workarounds exists that require a lifetime of study to even begin to
> understand.
Yeah, having lived in unix all my life, that is shockingly true.
Unix terminals are like the field of Chemistry. All full of exceptions,
but that's the way the world is. You just memorize it.
> I went back to emacs on X and haven't looked back ;)
I use emacs on X in most or all other contexts. Sometimes an emacs
-nw is pretty useful though...
> On a more serious note, I sometimes uses emacs -nw still over ssh in a
> screen but frequently key combos fail - most noticeably any Fn keys and
> arrow keys,
Maybe my solution will help you, a lot of other stuff just started
working once I told screen what term it should provide to the shells
started in it.
Thank all of you for the help in this thread. My problem is now solved.
-pete
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-07 19:55 ` Peter Keller
@ 2011-04-08 14:49 ` Lake Shore Dr
2011-04-08 15:07 ` Peter Keller
0 siblings, 1 reply; 12+ messages in thread
From: Lake Shore Dr @ 2011-04-08 14:49 UTC (permalink / raw)
To: help-gnu-emacs
Congratulations. Screen is an application that is really worth making
it work. You just dettach/reattach your session at home/work/wherever
and never stop what you are doing.
Also, what were you writting in .screenrc? 'term xterm' or 'term "xterm"'
with double quotes? To me 'term "xterm"' gives the right value of the
$TERM variable.
Peter Keller <psilord@cs.wisc.edu> wrote:
> Richard Riley <rileyrg@googlemail.com> wrote:
>> Peter Keller <psilord@cs.wisc.edu> writes:
>>
>>> Hello,
>>>
>>> Using emacs 22.3.1 with screen version 4.00.03jw4 (FAU) 2-May-06 on a
>>> debian squeeze box, I have run into a problem.
>>>
>>> When running emacs -nw, not in a screen session, C-x C-<left/right>
>>> rotates me between buffers. When running in screen, only C-x
>>> <left/right> will rotate me between buffers. Having to lift up on the
>>> control key to use the arrows is *very* annoying when rapidly moving
>>> between buffers.
>>>
>>> How can I fix this problem so under screen the C-x C-<left/right>
>>> key combination works again? I have looked into both manuals, but
>>> emacs should see the right key use, and screen doesn't make mention
>>> that it messes about with C-x (well, without the escape sequence
>>> being infront if it at any rate.)
>>>
>>> Thank you.
>>
>> When going through a "minimalist" phase a year ago, I too used emacs -nw
>> in screen and/or tmux.
>
> I'm not so much in a minimalist phase as someone I hack with likes
> to pair program over an emacs -nw session in a screen on a machine
> to which are are both ssh'd.
>
>> It's all down to termcaps and TERM setting and how emacs uses them.
>
> So, the quick and dirty problem (after debugging for a while) is that
> screen, by default sets the TERM env var in shells inside of screen to
> "screen". Emacs gets upset at this.
>
> If you start screen like 'screen -T xterm', then the TERM variable
> for all shells created in the screen is 'xterm' and emacs functions
> properly with respect to C-x C-<left/right>. This makes me very happy.
>
> I tried setting 'term xterm' in the .screenrc, but it didn't seem to
> work, so a bash alias of "alias screen='screen -T xterm'" is sufficient
> for me.
>
>> I can only say : impossibly complicated and oodles of hackish
>> workarounds exists that require a lifetime of study to even begin to
>> understand.
>
> Yeah, having lived in unix all my life, that is shockingly true.
> Unix terminals are like the field of Chemistry. All full of exceptions,
> but that's the way the world is. You just memorize it.
>
>> I went back to emacs on X and haven't looked back ;)
>
> I use emacs on X in most or all other contexts. Sometimes an emacs
> -nw is pretty useful though...
>
>> On a more serious note, I sometimes uses emacs -nw still over ssh in a
>> screen but frequently key combos fail - most noticeably any Fn keys and
>> arrow keys,
>
> Maybe my solution will help you, a lot of other stuff just started
> working once I told screen what term it should provide to the shells
> started in it.
>
> Thank all of you for the help in this thread. My problem is now solved.
>
> -pete
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-08 14:49 ` Lake Shore Dr
@ 2011-04-08 15:07 ` Peter Keller
2011-04-11 5:57 ` Jonathan Groll
[not found] ` <mailman.2.1302501432.8606.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 12+ messages in thread
From: Peter Keller @ 2011-04-08 15:07 UTC (permalink / raw)
To: help-gnu-emacs
Lake Shore Dr <nospam@nospam.com> wrote:
> Congratulations. Screen is an application that is really worth making
> it work. You just dettach/reattach your session at home/work/wherever
> and never stop what you are doing.
Yeah, I hadn't really used screen before even though I'd been a
unix user for a very long time. Now that I've started using it,
I'll likely use it everywhere.
> Also, what were you writting in .screenrc? 'term xterm' or 'term "xterm"'
> with double quotes? To me 'term "xterm"' gives the right value of the
> $TERM variable.
I was using in my .screenrc:
term xterm
From the man page for screen:
---------------------------------------------------------------------
term term
In each window's environment screen opens, the $TERM variable is set to
"screen" by default. But when no description for "screen" is installed
in the local termcap or terminfo data base, you set $TERM to - say -
"vt100". This won't do much harm, as screen is VT100/ANSI compatible.
The use of the "term" command is discouraged for non-default purpose.
That is, one may want to specify special $TERM settings (e.g. vt100)
for the next "screen rlogin othermachine" command. Use the command
"screen -T vt100 rlogin othermachine" rather than setting and resetting
the default.
---------------------------------------------------------------------
I thought the double quotes were just literal specifers for the values,
not actually required.
The entry for 'termcap' below the above entry gives some examples like this:
termcap xterm* LP:hs@
termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
So I thought
term xterm
was ok.
I just tried it with
term "xterm"
and got the correct functionality.
I appreciate your suggestion! Thank you!
-pete
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-08 15:07 ` Peter Keller
@ 2011-04-11 5:57 ` Jonathan Groll
2011-04-11 13:25 ` Teemu Likonen
[not found] ` <mailman.2.1302501432.8606.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 12+ messages in thread
From: Jonathan Groll @ 2011-04-11 5:57 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, 8 Apr 2011 15:07:50 +0000 (UTC), Peter Keller <psilord@cs.wisc.edu> wrote:
> > Also, what were you writting in .screenrc? 'term xterm' or 'term "xterm"'
> > with double quotes? To me 'term "xterm"' gives the right value of the
> > $TERM variable.
>
Unrelated to Peter's problem (which appears to be solved) I've got
other screen & emacs questions for the list:
(1) I'm curious to know what other Emacs users have as their escape
sequence in screen, as the default C-a means losing an oft-used emacs
key combination.
Currently I have the tilde:
escape ~~
But previously used to use C-z:
escape ^za
What does eveyone else use?
(2) Also, to further muddy the waters, what is the benefit of using
ElScreen: http://www.morishima.net/~naoto/software/elscreen/
ElScreen sounds good, is an "all emacs" solution, but surely it is not
usable in the same way as GNU screen, for instance would it be
possible to resume an ElScreen session from a remote machine (without
using GNU screen as well)?
Cheers,
Jonathan
--
jjg: Jonathan J. Groll : groll co za
has_one { :blog => "http://bloggroll.com" }
Sent from my computer device which runs on free software
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: emacs and screen
2011-04-11 5:57 ` Jonathan Groll
@ 2011-04-11 13:25 ` Teemu Likonen
0 siblings, 0 replies; 12+ messages in thread
From: Teemu Likonen @ 2011-04-11 13:25 UTC (permalink / raw)
To: Jonathan Groll; +Cc: help-gnu-emacs
* 2011-04-11T07:57:06+02:00 * Jonathan Groll wrote:
> Currently I have the tilde:
> escape ~~
>
> But previously used to use C-z:
> escape ^za
>
> What does eveyone else use?
I think ^zz is the most optimal (QWERTY, Finnish keyboard). I pretty
much never need C-z otherwise, but even that is still easy to send to
the terminal (C-z z).
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <mailman.2.1302501432.8606.help-gnu-emacs@gnu.org>]
* Re: emacs and screen
[not found] ` <mailman.2.1302501432.8606.help-gnu-emacs@gnu.org>
@ 2011-04-11 6:00 ` Peter Keller
0 siblings, 0 replies; 12+ messages in thread
From: Peter Keller @ 2011-04-11 6:00 UTC (permalink / raw)
To: help-gnu-emacs
Jonathan Groll <lists@groll.co.za> wrote:
> On Fri, 8 Apr 2011 15:07:50 +0000 (UTC), Peter Keller <psilord@cs.wisc.edu> wrote:
>> > Also, what were you writting in .screenrc? 'term xterm' or 'term "xterm"'
>> > with double quotes? To me 'term "xterm"' gives the right value of the
>> > $TERM variable.
>>
>
> Unrelated to Peter's problem (which appears to be solved) I've got
> other screen & emacs questions for the list:
>
> (1) I'm curious to know what other Emacs users have as their escape
> sequence in screen, as the default C-a means losing an oft-used emacs
> key combination.
>
> Currently I have the tilde:
> escape ~~
>
> But previously used to use C-z:
> escape ^za
>
> What does eveyone else use?
I use CTRL-] instead of CTRL-a because noone uses telnet anymore. :)
-pete
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-04-11 13:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-06 20:25 emacs and screen Peter Keller
2011-04-07 2:20 ` Javier
2011-04-07 4:11 ` Peter Keller
2011-04-07 10:28 ` Valentin Plechinger
[not found] ` <mailman.5.1302172224.24221.help-gnu-emacs@gnu.org>
2011-04-07 16:33 ` Peter Keller
2011-04-07 10:39 ` Richard Riley
2011-04-07 19:55 ` Peter Keller
2011-04-08 14:49 ` Lake Shore Dr
2011-04-08 15:07 ` Peter Keller
2011-04-11 5:57 ` Jonathan Groll
2011-04-11 13:25 ` Teemu Likonen
[not found] ` <mailman.2.1302501432.8606.help-gnu-emacs@gnu.org>
2011-04-11 6:00 ` Peter Keller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).