all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Changing window from term
Date: Sun, 30 Nov 2008 11:48:39 -0800 (PST)	[thread overview]
Message-ID: <23ac47f9-d50f-4894-b287-06d55e00d94a@z6g2000pre.googlegroups.com> (raw)
In-Reply-To: 58655828-466e-4026-9668-595a8848a94b@s20g2000yqh.googlegroups.com

On Nov 30, 9:24 am, Florian Lindner <Florian.Lind...@xgm.de> wrote:
> 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?

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/

      parent reply	other threads:[~2008-11-30 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-30 17:24 Changing window from term Florian Lindner
2008-11-30 17:35 ` Teemu Likonen
2008-11-30 18:19 ` Peter Dyballa
2008-11-30 19:48 ` Xah Lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23ac47f9-d50f-4894-b287-06d55e00d94a@z6g2000pre.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.