Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing window from term

0 views
Skip to first unread message

Florian Lindner

unread,
Nov 30, 2008, 12:24:00 PM11/30/08
to
Hello,

so far I have discovered two different methods using the shell with
Emacs. shell and term. shell I don't like because it's too much a text
file. I prefer just to have my shell in a seperate window (with up and
down recalling the command history).
term does this so far. But once loaded some Emacs commands are not
working anymore. For example I can't change to another buffer with C-x
o. I know the problem is that the shell input interferes with the
Emacs input.

Any idea how to make this work?

Thanks,

Florian

Teemu Likonen

unread,
Nov 30, 2008, 12:35:07 PM11/30/08
to
Florian Lindner (2008-11-30 09:24 -0800) wrote:

> term does this so far. But once loaded some Emacs commands are not
> working anymore. For example I can't change to another buffer with C-x
> o. I know the problem is that the shell input interferes with the
> Emacs input.
>
> Any idea how to make this work?

Basically normal C-x commands are behind C-c. For example, other-window
is "C-c o". For more info, see the documentation for Lisp function
"term-mode".

Peter Dyballa

unread,
Nov 30, 2008, 1:19:29 PM11/30/08
to Florian Lindner, help-gn...@gnu.org

Am 30.11.2008 um 18:24 schrieb Florian Lindner:

> Any idea how to make this work?

Use the mouse!

--
Mit friedvollen Grüßen

Pete

You can learn many things from children. How much patience you have,
for instance.
– Franklin P. Jones

Xah Lee

unread,
Nov 30, 2008, 2:48:39 PM11/30/08
to

The purpose of “Alt+x shell” is to let you do interactive shell in
emacs while retain much of the emac's functionalities.

The purpose of “Alt+x term” is to turn emacs into a terminal emulator.

Once you are in a terminal emulator mode, normal emacs bindings you
are used to no longer works because you told emacs to pretend it is a
terminal emulator.

So, basically you cannot have both worlds.

If you really want, you can modify keybinding in one or the other to
get the behavior you like.

e.g.

(add-hook 'comint-mode-hook
(lambda ()
(define-key comint-mode-map (kbd "<f11>") 'comint-previous-input)
(define-key comint-mode-map (kbd "<f12>") 'comint-next-input)
(define-key comint-mode-map (kbd "S-<f11>") 'comint-previous-
matching-input)
(define-key comint-mode-map (kbd "S-<f12>") 'comint-next-matching-
input)
))

in your case, you want “<f11>” should be “<up>” and “<f12>” should be
“<down>”.

Btw, by default Ctrl+ up/down arrow should do what you want.

Xah
http://xahlee.org/


0 new messages