* emacs key bindings: normal .emacs entries don't work
@ 2004-10-05 1:09 John Bullock
2004-10-06 9:18 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: John Bullock @ 2004-10-05 1:09 UTC (permalink / raw)
Hello,
I use GNU Emacs 22.1 -- via a tty terminal, not through X.
I am trying to change the default key bindings so that (for example)
Control-right moves the cursor forward by one word. Newsgroups are full of
solutions to this problem, but to date, none of them have helped me.
I've tried each of these lines in .emacs:
(global-set-key (quote [C-right]) (quote forward-word))
(global-set-key [C-right] 'forward-word)
(global-set-key [(control right)] 'forward-word)
None have worked. In addition, I tried
(global-set-key [?\C-right] 'forward-word)
but this, apparently, isn't valid.
Incidentally, I don't have this problem when I run emacs under X -- only when
I try to run it from a terminal. Is it likely that the problem lies not with
my .emacs file but with some setting of my terminal?
Thanks,
--John
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs key bindings: normal .emacs entries don't work
[not found] <mailman.1359.1096940862.2017.help-gnu-emacs@gnu.org>
@ 2004-10-05 20:01 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-10-05 20:01 UTC (permalink / raw)
> None have worked.
How should we guess the problem if you don't tell us in what way it didn't
work (i.e. what did it do)?
Stefan
PS: Given your description, the problem is not in global-set-key but in
the description of how your twerminal encodes the C-right operation.
I.e. any fix will be specific to your terminal, so you have to tell us
which it is.
Also try to hit C-right and then C-h l and tell us what was the result,
this will tell us what escape sequence was generated by your terminal.
Do that as well with just `right C-h l' so we can compare, to make sure
that the terminal distinguishes between the two. Most likely it doesn't and
there's nothing that Emacs can do until you fix your terminal.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs key bindings: normal .emacs entries don't work
2004-10-05 1:09 emacs key bindings: normal .emacs entries don't work John Bullock
@ 2004-10-06 9:18 ` Eli Zaretskii
2004-10-07 10:50 ` John Bullock
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Eli Zaretskii @ 2004-10-06 9:18 UTC (permalink / raw)
> From: "John Bullock" <john.bullock@stanford.edu>
> Date: Mon, 4 Oct 2004 18:09:46 -0700
>
> I use GNU Emacs 22.1 -- via a tty terminal, not through X.
> I am trying to change the default key bindings so that (for example)
> Control-right moves the cursor forward by one word. Newsgroups are full of
> solutions to this problem, but to date, none of them have helped me.
>
> I've tried each of these lines in .emacs:
>
> (global-set-key (quote [C-right]) (quote forward-word))
> (global-set-key [C-right] 'forward-word)
> (global-set-key [(control right)] 'forward-word)
>
> None have worked.
Does Emacs at all see the C-right key? What happens if you press
C-right and then type C-l (that's a letter ell, not a digit one)? Do
you see <C-right> or some such in the *Help* buffer that Emacs pops?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs key bindings: normal .emacs entries don't work
2004-10-06 9:18 ` Eli Zaretskii
@ 2004-10-07 10:50 ` John Bullock
2004-10-07 10:50 ` John Bullock
[not found] ` <mailman.1901.1097146722.2017.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: John Bullock @ 2004-10-07 10:50 UTC (permalink / raw)
Thanks for this advice.
right C-h l produces "ESC O C C-h l"
C-right C-h l produces "C-x 1 ESC O C C-h l"
C-right C-l doesn't seem to cause a *Help* buffer to appear -- the screen
flickers for a moment, but that's all.
I should have noted: when I say that the various global-set-key lines I've
tried haven't worked, I mean that when I use them, C-right is just like using
the right arrow on its own. There is no functional difference at all.
--John
"Eli Zaretskii" <eliz@gnu.org> wrote in message
news:01c4ab85$Blat.v2.2.2$9ab3ef20@zahav.net.il...
>> From: "John Bullock" <john.bullock@stanford.edu>
>> Date: Mon, 4 Oct 2004 18:09:46 -0700
>>
>> I use GNU Emacs 22.1 -- via a tty terminal, not through X.
>> I am trying to change the default key bindings so that (for example)
>> Control-right moves the cursor forward by one word. Newsgroups are full of
>> solutions to this problem, but to date, none of them have helped me.
>>
>> I've tried each of these lines in .emacs:
>>
>> (global-set-key (quote [C-right]) (quote forward-word))
>> (global-set-key [C-right] 'forward-word)
>> (global-set-key [(control right)] 'forward-word)
>>
>> None have worked.
>
> Does Emacs at all see the C-right key? What happens if you press
> C-right and then type C-l (that's a letter ell, not a digit one)? Do
> you see <C-right> or some such in the *Help* buffer that Emacs pops?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs key bindings: normal .emacs entries don't work
2004-10-06 9:18 ` Eli Zaretskii
2004-10-07 10:50 ` John Bullock
@ 2004-10-07 10:50 ` John Bullock
[not found] ` <mailman.1901.1097146722.2017.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: John Bullock @ 2004-10-07 10:50 UTC (permalink / raw)
Thanks for this advice.
right C-h l produces "ESC O C C-h l"
C-right C-h l produces "C-x 1 ESC O C C-h l"
C-right C-l doesn't seem to cause a *Help* buffer to appear -- the screen
flickers for a moment, but that's all.
I should have noted: when I say that the various global-set-key lines I've
tried haven't worked, I mean that when I use them, C-right is just like using
the right arrow on its own. There is no functional difference at all.
--John
"Eli Zaretskii" <eliz@gnu.org> wrote in message
news:01c4ab85$Blat.v2.2.2$9ab3ef20@zahav.net.il...
>> From: "John Bullock" <john.bullock@stanford.edu>
>> Date: Mon, 4 Oct 2004 18:09:46 -0700
>>
>> I use GNU Emacs 22.1 -- via a tty terminal, not through X.
>> I am trying to change the default key bindings so that (for example)
>> Control-right moves the cursor forward by one word. Newsgroups are full of
>> solutions to this problem, but to date, none of them have helped me.
>>
>> I've tried each of these lines in .emacs:
>>
>> (global-set-key (quote [C-right]) (quote forward-word))
>> (global-set-key [C-right] 'forward-word)
>> (global-set-key [(control right)] 'forward-word)
>>
>> None have worked.
>
> Does Emacs at all see the C-right key? What happens if you press
> C-right and then type C-l (that's a letter ell, not a digit one)? Do
> you see <C-right> or some such in the *Help* buffer that Emacs pops?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs key bindings: normal .emacs entries don't work
[not found] ` <mailman.1901.1097146722.2017.help-gnu-emacs@gnu.org>
@ 2004-10-07 15:54 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-10-07 15:54 UTC (permalink / raw)
> right C-h l produces "ESC O C C-h l"
> C-right C-h l produces "C-x 1 ESC O C C-h l"
So right and C-right generate the same sequence "ESC O C" (the C-x 1 is not
from C-right but because you hit C-x 1 before, presumably in order to get
rid of the *Help* buffer).
There's nothing Emacs (or any other application for that matter) can do here.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-10-07 15:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-05 1:09 emacs key bindings: normal .emacs entries don't work John Bullock
2004-10-06 9:18 ` Eli Zaretskii
2004-10-07 10:50 ` John Bullock
2004-10-07 10:50 ` John Bullock
[not found] ` <mailman.1901.1097146722.2017.help-gnu-emacs@gnu.org>
2004-10-07 15:54 ` Stefan Monnier
[not found] <mailman.1359.1096940862.2017.help-gnu-emacs@gnu.org>
2004-10-05 20:01 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).