emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode + icicles, avoid key binding redefinitions?
@ 2014-01-18 19:49 John Kitchin
  2014-01-18 21:40 ` Alan Schmitt
                   ` (2 more replies)
  0 siblings, 3 replies; 41+ messages in thread
From: John Kitchin @ 2014-01-18 19:49 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

Is anyone using org-mode and icicles?

I am trying it out, and icicles seems to have clobbered a few key bindings
like C-c ' to open source blocks.

It doesn't seem to matter which order  I load these packages. Does anyone
do this without clobbering org bindings? Thanks,

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

[-- Attachment #2: Type: text/html, Size: 732 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Re: org-mode + icicles, avoid key binding redefinitions?
@ 2014-01-23  4:45 Drew Adams
  2014-01-23  7:43 ` Bastien
  2014-01-23 13:57 ` Alan Schmitt
  0 siblings, 2 replies; 41+ messages in thread
From: Drew Adams @ 2014-01-23  4:45 UTC (permalink / raw)
  To: emacs-orgmode

Someone pointed me to this thread.  I am not subscribed to this
list, so cc me if you want me to see a reply you write.

Wrt some of what I read in the thread:

1. It is not true, (or else it is meaningless, depending on what
you mean by that phrase) that "C-c ' is officially an Emacs
keybinding".

Just because Org is part of Emacs does not mean that any key
bindings enabled for Org mode are somehow the "official" Emacs
bindings for those keys, and so take precedence over bindings
from "unofficial" packages.

That would be absurd.  Think about it.  Is key `b' taken once and
for all, just because "official Emacs" `compilation-minor-mode-map'
binds it to `compile-mode-summary'?  Is `C-x C-s' taken, just
because official `rcirc-multiline-minor-mode-map' binds it to
`rcirc-multiline-minor-submit'?  Is `C-c C-SPC' taken, because
`erc-track-minor-mode-map' binds it to `erc-track-switch-buffer'?

1a. From the Elisp manual, node `Key Binding Conventions':

 * Sequences consisting of `C-c' followed by `{', `}', `<',
   `>', `:' or `;' are also reserved for major modes.

 * Sequences consisting of `C-c' followed by any other punctuation
   character are allocated for minor modes.  Using them in a major
   mode is not absolutely prohibited, but if you do that, the major
   mode binding may be shadowed from time to time by minor modes.

IOW, no major mode should bind any of the latter group of keys,
including `C-'' and `C-`', and any minor mode may do so - whether
that mode is "official" or not.

1b. There is no global default binding for `C-'' in `emacs -Q'.
And there should not be, since it is reserved for minor modes.

I don't know whether Org binds `C-'' for a minor mode or for
a major mode, but if it is the latter then it is in violation
of the convention.  If it is the former, then that is fine.

1c. Just as it is fine for any other minor mode to bind the same
key.  Icicle mode is a (global) minor mode.  By default, Icicles
binds `C-'' in `icicle-mode-map' (to command `icicle-occur').

1d. By default only.  It is trivial to customize user option
`icicle-top-level-keybindings', to bind `icicle-occur' to a
different key or to give it no key binding at all.

(And no, you do not need to fiddle with Lisp to do that - not
even `define-key'.  `M-x customize-option' is your friend -
just get yourself a separate `custom-file', for sanity.)

1e. The same holds for `C-`', which Icicles binds by default
to `icicle-search'.  And it holds for any other top-level
keys.

If you think that Icicles is "clobbering" any key bindings
that you prefer from another package (such as Org), it is
simple to change keys (in Icicles anyway; dunno about Org).
Icicles does not "clobber" any keys without your permission
- just customize `icicle-top-level-keybindings'.

1f. There are similar Icicles user options for key bindings
in minibuffer keymaps.  Minibuffer keymaps are major-mode
maps.  But any bindings Icicles makes in those maps are in
effect only while you are in Icicle (minor) mode.

2. If you have a recent Emacs version, it is simple to
download and install Icicles from MELPA.  Likewise, to
update it.

There are also other easy ways to download it, listed here:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Libraries#toc5.
Icicles is 10 files of Lisp code and 3 files of non-code
(doc and change history).  If you download the files without
using the package system, then just put the files in your
`load-path' to "install" Icicles.


All of this is clearly documented, both on Emacs Wiki and
in the doc files that are part of your Icicles download.
If you do not want to read the doc in general, then you
can read just this about Icicles key bindings:
http://www.emacswiki.org/emacs/Icicles_-_Key_Bindings

HTH.  Sorry for your trouble.

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

end of thread, other threads:[~2014-01-30  0:40 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-18 19:49 org-mode + icicles, avoid key binding redefinitions? John Kitchin
2014-01-18 21:40 ` Alan Schmitt
2014-01-19 15:53 ` Bastien
2014-01-19 17:31 ` Memnon Anon
2014-01-19 20:56   ` John Kitchin
2014-01-20  2:34     ` Memnon Anon
2014-01-20 23:12       ` Alan Schmitt
  -- strict thread matches above, loose matches on Subject: below --
2014-01-23  4:45 Drew Adams
2014-01-23  7:43 ` Bastien
2014-01-23 15:33   ` Drew Adams
2014-01-23 15:46     ` Bastien
2014-01-23 16:28       ` Drew Adams
2014-01-23 16:34         ` Bastien
2014-01-23 17:01           ` Drew Adams
2014-01-23 22:24             ` Bastien
2014-01-23 22:56               ` Drew Adams
2014-01-23 23:29               ` Thomas S. Dye
2014-01-24  8:39                 ` Bastien
2014-01-25  7:34                   ` Thomas S. Dye
2014-01-28  9:08                     ` Bastien
2014-01-29  8:43                       ` Sebastien Vauban
2014-01-29  9:39                         ` Bastien
2014-01-29 10:35                           ` Sebastien Vauban
2014-01-29 11:00                             ` Bastien
2014-01-29 11:32                               ` Sebastien Vauban
2014-01-29 17:34                         ` Thomas S. Dye
2014-01-29 17:48                           ` Bastien
2014-01-29 19:48                             ` Thomas S. Dye
2014-01-29 20:11                               ` Iannis Zannos
2014-01-30  0:39                               ` Bastien
2014-01-29 11:44                       ` Florian Beck
2014-01-29 13:16                         ` Nick Dokos
2014-01-29 13:52                           ` Bastien
2014-01-29 18:01                             ` Achim Gratz
2014-01-29 20:06                             ` Andreas Leha
2014-01-29 20:13                               ` Iannis Zannos
2014-01-29 14:43                           ` Florian Beck
2014-01-29 15:40                             ` Bastien
2014-01-29 16:20                               ` Nicolas Goaziou
2014-01-23 13:57 ` Alan Schmitt
2014-01-23 15:33   ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).