help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: impossible to leave a shell frame with C-o


From: Tim X
Subject: Re: impossible to leave a shell frame with C-o
Date: Sun, 13 Feb 2011 11:47:53 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

paragoge <address@hidden> writes:

> This is my first posting, here. 
> With two opened frames, I normally move to the other with C-o, but this is
> impossible from a shell frame.
> Is there a special shortcut?
> Thank you. 

Its important to try and stick with standard emacs terminology when
asking for help to avoid confusion. In emacs, Frames are what many other
systems call windows and windows are the buffer display area within a
frame. You can have multiple frames and each frame can have multiple
windows. From your description, it sounds like your probably talking
about windows rather than frames. 

The standard definition of C-o is open-line. Therefore, your setup must
have modified the standard key bindings in either your .emacs file or a
site wide initialisation file or your running one of the 'ergonomic'
packages which remap many of the standard key bindings. 

The standard binding for other-window is C-x o. Many people don't
realise that emacs actually has an underlying philosophy/theme to how it
binds commands to keys. For example, many of the buffer/window/frame
related commands are bound to a C-x prefix. I would first see if C-x o
is bound to other-window while in shell mode.

For shell mode (i.e. M-x shell), C-o is normally bound to
switch-to-completions (at least in Emacs 24.0.50). 

Two very useful commands to diagnose problems relating to key bindings
are

C-h b (list all the key bindings for the current buffer)
C-h k (list key bindings for a specific key)

An error people sometimes make when re-mapping key bindings is that they
do a global key binding. However, many modes will setup their own mode
specific key bindings, which will override the global definitions. some
of the packages that attempt to re-map standard emacs key bindings
either overlook this or require you to setup mode specific bindings
within one of the modes startup hooks.

You need to work out what is bound to C-o in your shell mode buffer (use
C-h k) and then decide if you need that binding. If you don't, you can
probably unbind the existing definition and re-bind it to other-window
in one of the mode's load/startup hooks. Alternatively, you may still be
able to use the standard definition of C-x o while in shell mode. 

Note that if you do rebind some keys, rememer that some modes, like
shell mode, have some restrictions because the interpreter will attempt
to consume some key sequences (such as C-c).

Tim
-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]