unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Anupam Sengupta" <anupam@none.none>, <help-gnu-emacs@gnu.org>
Subject: RE: Resolving Key Sequence conflict between icicles and org-mode
Date: Wed, 23 May 2007 08:18:43 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICCEOKDMAA.drew.adams@oracle.com> (raw)
In-Reply-To: <m2tzu4qapl.fsf@usa-tcs.com>

> 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	other threads:[~2007-05-23 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23  7:07 Resolving Key Sequence conflict between icicles and org-mode Anupam Sengupta
2007-05-23 15:18 ` Drew Adams [this message]
     [not found] <mailman.1087.1179933678.32220.help-gnu-emacs@gnu.org>
2007-05-24  4:31 ` Anupam Sengupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICCEOKDMAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=anupam@none.none \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).