all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* The [(control i)] and [(tab)] problem
@ 2002-12-04  9:36 Boris H.
  2002-12-04 15:33 ` Stefan Monnier <foo@acm.com>
  2002-12-04 15:59 ` Eric Hanchrow
  0 siblings, 2 replies; 6+ messages in thread
From: Boris H. @ 2002-12-04  9:36 UTC (permalink / raw)


I've tried to remap C-i several times in Emacs 21.1 with different methods, 
but obviously Emacs can't distinguish C-i from tab. The method described in 
info emacs didn't work. In XEmacs, C-i and tab can be remapped 
independently.

I want to map C-i to ispell-word and leave the binding of tab unaffected. 

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

* Re: The [(control i)] and [(tab)] problem
  2002-12-04  9:36 The [(control i)] and [(tab)] problem Boris H.
@ 2002-12-04 15:33 ` Stefan Monnier <foo@acm.com>
  2002-12-04 15:59 ` Eric Hanchrow
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-12-04 15:33 UTC (permalink / raw)


>>>>> "Boris" == Boris H <nosp@m.de> writes:
> I've tried to remap C-i several times in Emacs 21.1 with different methods, 
> but obviously Emacs can't distinguish C-i from tab. The method described in 
> info emacs didn't work. In XEmacs, C-i and tab can be remapped 
> independently.

By default, the TAB key is remapped at a fairly low level
(i.e. in function-key-map) to C-i and then all "bindings to the TAB key"
are actually bindings to the C-i key.

You can remove the remapping from function-key-map (or more simply you
can define a binding for [tab] in the global map which will cause
the remapping to be ignored).

But note that many places will then change the C-i binding thinking
it also affects the TAB key.  That doesn't mean it won't work, but just
that you might find some bindings "missing" (you can of course fix them
manually).


        Stefan


PS: Note that on console or in an xterm, the TAB key and C-i are
    indistinguishable, so the above only applies to non-tty uses of Emacs.

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

* Re: The [(control i)] and [(tab)] problem
  2002-12-04  9:36 The [(control i)] and [(tab)] problem Boris H.
  2002-12-04 15:33 ` Stefan Monnier <foo@acm.com>
@ 2002-12-04 15:59 ` Eric Hanchrow
  2002-12-05 10:01   ` Boris H.
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Hanchrow @ 2002-12-04 15:59 UTC (permalink / raw)


>>>>> "Boris" == Boris H <nosp@m.de> writes:

    Boris> Emacs can't distinguish C-i from tab.

Not true, at least with GNU Emacs 21.2.

    Boris> I want to map C-i to ispell-word and leave the binding of
    Boris> tab unaffected.

Try this

(progn
(local-set-key [tab] (local-key-binding "\C-i"))
(local-set-key "\C-i" 'ispell-word))

-- 
PGP Fingerprint: 3E7B A3F3 96CA 8958 ACC5  C8BD 6337 0041 C01C 5276

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

* Re: The [(control i)] and [(tab)] problem
  2002-12-04 15:59 ` Eric Hanchrow
@ 2002-12-05 10:01   ` Boris H.
  2002-12-05 15:05     ` Kai Großjohann
  2002-12-05 15:07     ` Kai Großjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Boris H. @ 2002-12-05 10:01 UTC (permalink / raw)


Eric Hanchrow wrote:

> (progn
> (local-set-key [tab] (local-key-binding "\C-i"))
> (local-set-key "\C-i" 'ispell-word))
> 

I've just tried this with Emacs 21.1 and it still doesn't work. I might 
install 21.2 to fix this, but I once had the problem that 21.2 ignored 
(tool-bar-mode nil). Is there a way to fix this?

Boris

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

* Re: The [(control i)] and [(tab)] problem
  2002-12-05 10:01   ` Boris H.
@ 2002-12-05 15:05     ` Kai Großjohann
  2002-12-05 15:07     ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Kai Großjohann @ 2002-12-05 15:05 UTC (permalink / raw)


"Boris H." <nosp@m.de> writes:

> Eric Hanchrow wrote:
>
>> (progn
>> (local-set-key [tab] (local-key-binding "\C-i"))
>> (local-set-key "\C-i" 'ispell-word))
>> 
>
> I've just tried this with Emacs 21.1 and it still doesn't work. I might 
> install 21.2 to fix this, but I once had the problem that 21.2 ignored 
> (tool-bar-mode nil). Is there a way to fix this?

What exactly did you try?  The above snippet needs some surrounding
code.

I think you wanted this behavior in a specific mode, but I forget
which one.  So you want to add a function to the mode hook which
executes the given Lisp code.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

* Re: The [(control i)] and [(tab)] problem
  2002-12-05 10:01   ` Boris H.
  2002-12-05 15:05     ` Kai Großjohann
@ 2002-12-05 15:07     ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Kai Großjohann @ 2002-12-05 15:07 UTC (permalink / raw)


"Boris H." <nosp@m.de> writes:

> I've just tried this with Emacs 21.1 and it still doesn't work. I might 
> install 21.2 to fix this, but I once had the problem that 21.2 ignored 
> (tool-bar-mode nil). Is there a way to fix this?

Hm.  You want this everywhere.  Let's try something easier first.
The following will let C-i behave like always (and like TAB did
before), but <tab> will now invoke ispell.  Does this work?

(global-set-key (kbd "<tab>") 'ispell-word)
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

end of thread, other threads:[~2002-12-05 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-04  9:36 The [(control i)] and [(tab)] problem Boris H.
2002-12-04 15:33 ` Stefan Monnier <foo@acm.com>
2002-12-04 15:59 ` Eric Hanchrow
2002-12-05 10:01   ` Boris H.
2002-12-05 15:05     ` Kai Großjohann
2002-12-05 15:07     ` Kai Großjohann

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.