From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: C-Ret: cua and icicles Date: Sat, 22 May 2010 08:35:04 -0700 Message-ID: <30E9CD913F7940E5A0F92DD74C1BA186@us.oracle.com> References: <28642650.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274542562 4915 80.91.229.12 (22 May 2010 15:36:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 May 2010 15:36:02 +0000 (UTC) To: "'Dirk80'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 22 17:36:01 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFqk1-0000as-5u for geh-help-gnu-emacs@m.gmane.org; Sat, 22 May 2010 17:35:57 +0200 Original-Received: from localhost ([127.0.0.1]:56638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFqk0-00055L-H2 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 May 2010 11:35:56 -0400 Original-Received: from [140.186.70.92] (port=57457 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFqjc-00055G-LP for Help-gnu-emacs@gnu.org; Sat, 22 May 2010 11:35:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFqja-0002ZX-Ii for Help-gnu-emacs@gnu.org; Sat, 22 May 2010 11:35:32 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:62312) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFqja-0002ZP-CJ for Help-gnu-emacs@gnu.org; Sat, 22 May 2010 11:35:30 -0400 Original-Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4MFZPlG028803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 22 May 2010 15:35:26 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4MEQPtW022631; Sat, 22 May 2010 15:35:24 GMT Original-Received: from abhmt012.oracle.com by acsmt353.oracle.com with ESMTP id 259744841274542487; Sat, 22 May 2010 08:34:47 -0700 Original-Received: from dradamslap1 (/10.175.220.217) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 22 May 2010 08:34:47 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <28642650.post@talk.nabble.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Thread-Index: Acr5nvjua2wwgUHrS5y/kUqzmolIfQAHvE6g X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090205.4BF7F9BF.0009:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73737 Archived-At: Hi Dirk, > I'm using cua and I started to use icicles which is really > great. I know that using cua and icicles at the same time > is not really recommended. But at the moment I only have > problems with C-Ret. In Emacswiki I found the following text: > > 6. I expect that you will need to bind one or more keys > differently, to accommodate both CUA mode and Icicles. > At a minimum, you will need to either (a) bind > 'cua-set-rectangle-mark' to something besides 'C-RET' in > CUA mode or (b) bind 'icicle-candidate-action' to something > besides 'C-RET' in each of the minibuffer completion maps > when you are in Icicle mode. > > I'd like to have the following behaviour: > When I am in a normal buffer then I want that C-RET is bound to > 'cua-set-rectangle-mark'. When I'm in minibuffer or > *completion* buffer then I want that C-RET is bound to > 'icicle-candidate-action'. > > Would be great if you can help me to get this desired behaviour. > > And then another question to this topic: > Are there more key combination where cua and icicles conflict? Starting with the last question first: I don't know. I'm not very familiar with CUA-mode. A good way to discover key conflicts is to load my library `help-fns+.el' and use `C-h C-k' (`describe-keymap') to list the key bindings of any keymap you're interested in, in a user-friendly format. You can do that for the CUA-mode map and for `icicle-mode-map', to see where there might be conflicts outside the minibuffer. You can do that for the minibuffer maps with Icicle mode turned off and on, comparing the two, to see whether CUA-mode has any minibuffer key conflicts. (To see the names of the minibuffer keymaps, do `C-h v minibuffer.*-map S-TAB'.) The most important things to know about Icicles key bindings are these: 0. The complete key-binding doc is here: http://www.emacswiki.org/emacs/Icicles_-_Key_Bindings 1. When you exit Icicle mode (`M-x icy-mode') you get back your normal key bindings again. 2. Icicle mode is a global minor mode. And in Emacs, minor-mode key bindings take precedence over major-mode and global key bindings. So regardless of what bindings you define globally or in a major mode, if Icicle mode binds the same key, it wins (unless some other minor mode binds it...). 3. The Icicle-mode key bindings (`icicle-mode-map') are top-level bindings. Besides these, Icicles also binds some keys in the standard minibuffer keymaps (not in `icicle-mode-map'). 4. *You* control the Icicle-mode bindings using user option `icicle-top-level-key-bindings'. You can easily delete any default bindings you do not want, change the default `icicle-mode' bindings, or add new ones. You do not need to know Emacs Lisp to configure key bindings using this user option - it is straightforward. And if you set option `icicle-top-level-key-bindings' to nil, then Icicles binds *no* top-level keys (it binds only minibuffer keys). 6. In some cases, Icicle mode remaps some top-level keys only if they are bound to certain functions provided other libraries (e.g. ibuffer, ess, dired). That is, Icicles provides enhanced behavior for some commands from other libraries. If you load such a library after turning on Icicle mode, you can toggle Icicle mode twice to make Icicles recognize that the library has been loaded and remap such keys to their Icicles enhancements. Again, whether Icicles remaps a given key is controlled by option `icicle-top-level-key-bindings'. 7. There are also some Icicles user options that let you control some of the Icicles minibuffer bindings. To change any other minibuffer bindings (not associated with user options) you might need to resort to some Emacs-Lisp code. Those user options all have `key' in their name, so `C-h v icicle-.*key S-TAB' will show you all of them - just use `C-M-next' to see the doc string for each in turn, etc. For example, that will show that the (default) value of option `icicle-apropos-cycle-next-keys' is the list ([next]), meaning that there is only one key, `next' (PageDown) bound to cycle to the next candidate. You customize these key options the same way you customize option `icicle-top-level-key-bindings'. In this case, you could add more keys to the list or change [next] to some other key. Wrt your question about C-RET: Icicles does not bind C-RET outside of the minibuffer, where you say you do want Icicles to bind it anyway. So I do not see the problem you are having with C-RET. Please let me know just what happens that you would like to change - give me a step-by-step description (recipe) so I can understand. You can mail me off list. HTH - Drew