From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff Weiss Newsgroups: gmane.emacs.help Subject: RE: migrating from ido to icicles Date: Thu, 20 Dec 2012 22:53:20 -0500 Message-ID: <87r4mkoybz.fsf@blinky.jweiss.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356062018 13689 80.91.229.3 (21 Dec 2012 03:53:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2012 03:53:38 +0000 (UTC) To: Drew Adams , jeffrey.m.weiss@gmail.com, help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 21 04:53:52 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TltgG-0007vQ-B3 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 04:53:52 +0100 Original-Received: from localhost ([::1]:48171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tltg2-0005wO-MK for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Dec 2012 22:53:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tltfs-0005wJ-VB for help-gnu-emacs@gnu.org; Thu, 20 Dec 2012 22:53:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tltfo-0001Fq-IN for help-gnu-emacs@gnu.org; Thu, 20 Dec 2012 22:53:28 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:39956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tltfo-0001Fm-Aa for help-gnu-emacs@gnu.org; Thu, 20 Dec 2012 22:53:24 -0500 Original-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBL3rMId004667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Dec 2012 22:53:22 -0500 Original-Received: from blinky.jweiss.com (vpn-50-57.rdu2.redhat.com [10.10.50.57]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBL3rKjR007972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 20 Dec 2012 22:53:21 -0500 In-Reply-To: User-Agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/24.1.1 (x86_64-redhat-linux-gnu) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88268 Archived-At: Drew Adams writes: >> >> "M-SPC runs the command icicle-prefix-word-complete, which is an >> >> interactive compiled Lisp function in `icicles-mcmd.el'." >> >> I was able to successfully bind M-SPC to >> icicle-prefix-word-complete by >> customizing icicle-word-completion-keys. > > It is already bound to M-SPC, as you indicated above. > Perhaps you meant M-TAB. Sorry yes I meant M-TAB. >> However the docs for icicle-word-completion-keys suggest that >> I can also bind SPC if I wanted. That actually sounds better >> because I can't remember the last time I tried to complete a >> filename with a space in it. > > I don't recommend that, but you are welcome to do it. Icicles completion works > for all kinds of things, many of which contain space chars. > > The point of binding SPC to self-insertion is to, well, make it easy to insert a > space, rather than having to use `C-q SPC'. Likewise, for `?' and `C-j' > (newline). Ok, maybe it won't work out, but I definitely use actual space characters very rarely in the minibuffer for completion. >> But no matter what I put in that field, SPC wouldn't trigger >> icicle-prefix-word-complete, it was still bound to icicle-self-insert. > > You need to do three things: > > 1. What you did: add the SPC binding for `icicle-word-completion-keys'/ > > 2. Remove the SPC binding to `icicle-self-insert' from option > `icicle-completion-key-bindings'. > > 3. Toggle Icicle mode twice (exit and re-enter): M-x icy-mode M-x icy-mode. (Or > restart Emacs.) I'll try that, thanks. In general do I need to cycle icy-mode off/on when I change these bindings? I've noticed sometimes changes don't seem to take effect immediately, it's hard to tell which ones require restart. > Vanilla Emacs binds SPC to prefix word completion. Icicles binds it, in the > default value of `icicle-completion-key-bindings', to self-insertion insertion. > Likewise, `?' and `C-j'. > > As I said, Icicles is used for completing lots of things besides just commands > and file names, and it generally makes sense to have ` ', `?', and `C-j' be > self-inserting. But you can easily customize this away. > >> There's one other odd behavior I've been noticing. Even though I have >> icicle-expand-input-to-common-match-flag > > That option name should be without the `-flag'. Long ago the option was a > Boolean and its name had the suffix `-flag'. Since you mention a value of `1' > you clearly do not have an older version of Icicles where the option had that > former name. Ok, I copy/pasted that from the wiki page, I guess the actual variable doesn't have "-flag" in it. Makes sense since it isn't a boolean value. >> set to 1 (only expand when >> using tab or s-tab), I am finding that I do get input inserted for me >> as I'm trying to type, and it ends up mixing my input with its own, >> resulting in bad input in the minibuffer. >> >> For example, if the directory I'm completing in has 3 files, fop fob bar >> if I quickly type 'fo' what appears in the minibuffer is >> 'foo'. >> >> I think that's because it's trying to expand the common match, since all the >> files that have 'f' also have 'fo'. > > That is not what Icicles calls expansion to the common match. It is what > Icicles calls incremental completion. > > This explains common-match expansion: > http://www.emacswiki.org/emacs/Icicles_-_Expanded-Common-Match_Completion. > > This explains incremental completion: > http://www.emacswiki.org/emacs/Icicles_-_Icompletion > > You can cycle/toggle either of these during completion, to see the differences. > See the doc strings of `icicle-expand-input-to-common-match' and > `icicle-incremental-completion'. > > HTH. Ok now I'm confused. I've read the docs, they seem clear enough. I thought incremental completion means "when I type a character, the *Completions* buffer updates immediately to reflect what I just typed" And I thought common-match expansion meant "when all the completions have common characters beyond what's already in the minibuffer, they're automatically added to the minibuffer". Which one affects what's in the minibuffer? I could have sworn that's the common-match expansion, which I have turned off. And yet, somehow what I'm typing in the minibuffer ends up with extra characters that I didn't type, and ultimately there are 0 matches because I've got "foo" with an o that I typed, and an o that was added automatically, but there are no completions starting with 'foo'. -Jeff