all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)
@ 2015-08-06  6:34 Chris Seberino
  2015-08-07 22:36 ` Emanuel Berg
       [not found] ` <mailman.7965.1438987218.904.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Seberino @ 2015-08-06  6:34 UTC (permalink / raw
  To: help-gnu-emacs

Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)

I don't ansi-term is a special beast so any tips on how this may
be possible would be most appreciated.

Sincerely,

Chris


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)
  2015-08-06  6:34 Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?) Chris Seberino
@ 2015-08-07 22:36 ` Emanuel Berg
       [not found] ` <mailman.7965.1438987218.904.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-08-07 22:36 UTC (permalink / raw
  To: help-gnu-emacs

Chris Seberino <cseberino@gmail.com> writes:

> Possible to bind C-o to some function in an
> ansi-term? (Add something to term-mode-hook?)

What is an ansi-term?

I can bind C-o the normal way with no problem.

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)
       [not found] ` <mailman.7965.1438987218.904.help-gnu-emacs@gnu.org>
@ 2015-08-08  1:28   ` Dan Espen
  2015-08-09  1:43     ` Emanuel Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Espen @ 2015-08-08  1:28 UTC (permalink / raw
  To: help-gnu-emacs

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

> Chris Seberino <cseberino@gmail.com> writes:
>
>> Possible to bind C-o to some function in an
>> ansi-term? (Add something to term-mode-hook?)
>
> What is an ansi-term?

Try M-x ansi-term

It's a Emacs terminal that accepts the ansi-terminal escape sequences.

> I can bind C-o the normal way with no problem.

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.

I never found any of the multitude of Emacs shells useful.
I tried, but dired, M-x grep, locate, compile, etc.
get the job done for me.


-- 
Dan Espen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)
  2015-08-08  1:28   ` Dan Espen
@ 2015-08-09  1:43     ` Emanuel Berg
  2015-08-11  1:37       ` Robert Thorpe
  0 siblings, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2015-08-09  1:43 UTC (permalink / raw
  To: help-gnu-emacs

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?

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?)
  2015-08-09  1:43     ` Emanuel Berg
@ 2015-08-11  1:37       ` Robert Thorpe
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Thorpe @ 2015-08-11  1:37 UTC (permalink / raw
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-11  1:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06  6:34 Possible to bind C-o to some function in an ansi-term? (Add something to term-mode-hook?) Chris Seberino
2015-08-07 22:36 ` Emanuel Berg
     [not found] ` <mailman.7965.1438987218.904.help-gnu-emacs@gnu.org>
2015-08-08  1:28   ` Dan Espen
2015-08-09  1:43     ` Emanuel Berg
2015-08-11  1:37       ` Robert Thorpe

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.