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

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

Re: Possible to bind C-o to some function in an ansi-term? (Add somethin


From: Robert Thorpe
Subject: Re: Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)
Date: Tue, 11 Aug 2015 02:37:56 +0100

Emanuel Berg <embe8573@student.uu.se> writes:

> Dan Espen <despen@verizon.net> writes:
>
>> I think the OP may need to do the binding in
>> term-mode-hook. But I confess, I don't really
>> understand term.el and I haven't tried. It has
>> a term-mode-map and some other maps that just
>> confuse me.
>
> OK - well, it doesn't work just setting the
> term-mode-map, probably because the shell intercepts
> the keystrokes and this is the whole idea with the
> mode. Perhaps the OP can use 'M-x shell RET' where
> keys are setup like everwhere else?

As far as I know, and that's not very far....

Term-mode and ansi-term are now very similar.  They both have two modes
"character" and "line".  "Line" is like *shell*, each line is sent at
once to the shell.  "Character" is like a terminal, each character is
sent.  The only difference between ansi-term and term-mode is the escape
character (C-c for term-mode and both C-c and C-x for ansi-term).  So,
you can over-ride keybindings quite easily using term-mode-map in line
mode but not in character mode.  In character mode term-raw-map is used.
That looks like something you wouldn't want to tinker with.

BR,
Robert Thorpe



reply via email to

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