From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lake Shore Dr Newsgroups: gmane.emacs.help Subject: Re: emacs and screen Date: Fri, 8 Apr 2011 14:49:56 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1302277343 18336 80.91.229.12 (8 Apr 2011 15:42:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2011 15:42:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 08 17:42:19 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8Dp8-0000Ni-Dj for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 17:42:14 +0200 Original-Received: from localhost ([127.0.0.1]:44752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8Dp1-0006b3-JQ for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 11:42:07 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-2.dfn.de!news.dfn.de!newsfeed.straub-nv.de!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 85 Original-NNTP-Posting-Host: c5/hVGgWyY7PIrfOUKAMkg.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-686 (i686)) X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:186600 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80707 Archived-At: 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 wrote: > Richard Riley wrote: >> Peter Keller 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- >>> rotates me between buffers. When running in screen, only C-x >>> 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- >>> 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-. 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 > > > > > >