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
> 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".
> 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
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/
☄