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

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

RE: Resolving Key Sequence conflict between icicles and org-mode


From: Drew Adams
Subject: RE: Resolving Key Sequence conflict between icicles and org-mode
Date: Wed, 23 May 2007 08:18:43 -0700

> Recently, I came across Icicles mode, which seems to offer
> features far beyond IDO. However, there is a key sequence
> conflict between the Org-Mode and Icicles packages - on
> Shift-Tab <s-tab>).
>
> Org-Mode uses <s-tab> for the org-shifttab function to cycle
> global visibility of the outline, whereas Icicles binds this
> key to icicle-generic-S-tab for completions.
>
> Is there a way to locally rebind <s-tab> in Org-Mode buffers to
> be the original org-shifttab function?
>
> I did try M-x local-set-key  to try binding <s-tab> to org-shifttab in a
> org-mode buffer, however, this does not seem to help (the binding
> still remains with Icicles).

That is because the Icicles binding is a minor-mode binding. Whenever you
are in Icicle mode, the bindings in `icicle-mode-map' are in effect. Minor
mode bindings override global and local bindings.

> I also tried (define-key org-mode-map "<S-tab>" 'org-shifttab)
> in my .emacs after Org-mode and Icicles was loaded, but this
> does not work either.

I assume that Org mode is a major mode. Minor mode bindings take precedence.

> Any suggestions would be really welcome, as Icicles is a feature
> which looks pretty useful.

I see two choices: 1) use a different key for the Org mode command or 2) use
a different key for Icicle mode ;-). For information about Icicles key
bindings, see http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Key_Bindings.
For information about customizing Icicles key bindings, see
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Customizing_Key_Bindings.

Other possibilities include: 1) redefining `icicle-generic-S-tab' to call
`org-shifttab' when in Org mode, 2) binding S-TAB to a command that calls
`org-shifttab' when in Org mode and `icicle-generic-S-tab' otherwise.

If you decide not to change any key bindings, you can always turn off Icicle
mode whenever you are in Org mode, foregoing use of Icicles features when in
that mode. You can turn off Icicle mode manually each time you use Org mode,
or you can do that automatically in the Org mode hook.






reply via email to

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