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: Fri, 21 Dec 2012 09:41:22 -0500 Message-ID: References: Reply-To: me@jweiss.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0407152960bf2904d15dd7e4 X-Trace: ger.gmane.org 1356107613 30797 80.91.229.3 (21 Dec 2012 16:33:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2012 16:33:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 21 17:33:48 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 1Tm5Xd-0000SW-UN for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 17:33:46 +0100 Original-Received: from localhost ([::1]:49936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm5XQ-0001kK-5C for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 11:33:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm3n2-0003Zv-7V for help-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:41:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm3mu-0008KU-Tg for help-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:41:32 -0500 Original-Received: from mail-la0-f46.google.com ([209.85.215.46]:44970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm3mu-0008KJ-Fo for help-gnu-emacs@gnu.org; Fri, 21 Dec 2012 09:41:24 -0500 Original-Received: by mail-la0-f46.google.com with SMTP id p5so5197085lag.19 for ; Fri, 21 Dec 2012 06:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=zT5607P0uo/NtahPxwfGeC68LAyBxhxZXn+ETMRiouI=; b=jwRgXAApp6LdBxIxbCGEok1vsPqhqBUxOGw2NbhC1LB6VnJXz/lx1w3MxuxXz2B5K2 s33us/hrUE6uXrI93DHRW/dvfzzPjoNOsdWhFE6el7jFWehUX8IyL92ybr96YR7L9Lfl iqI5ErgLIdV9igGJoKieSltbC9gDz8Y1/6iheZWehnoqiuGorhOiebnfwvffndoXQp97 zTnmx+qb/Kvolvo7fekqUFy7ANomOX5hYgY6acfWs1JWXUc8Mb9psug6vWOy6yymzcRu CACaP3wEnbAXjdyJAiexQMyv+Gww9NnuBvN3tfNRjp1yBHF2Mn3Uqq/LR8t5gpTP0lh0 4PAw== Original-Received: by 10.152.111.41 with SMTP id if9mr12402459lab.23.1356100882447; Fri, 21 Dec 2012 06:41:22 -0800 (PST) Original-Received: by 10.114.29.65 with HTTP; Fri, 21 Dec 2012 06:41:22 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.215.46 X-Mailman-Approved-At: Fri, 21 Dec 2012 11:33:15 -0500 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:88277 Archived-At: --f46d0407152960bf2904d15dd7e4 Content-Type: text/plain; charset=ISO-8859-1 Ok, so I've tried all the combinations of both the incremental completion, and common-match. I'm still totally confused by the behavior. I think maybe there is a bug somewhere or I'm not understanding something fundamental. What I want is: Only fill in stuff on the minibuffer (the common match) when I press tab. Also, update the completions buffer as I type. I cannot get this behavior. It appears that the "1" setting for common match simply doesn't work. It's supposed to only expand to the common match when I press TAB or S-TAB, but actually it just does nothing. Pressing TAB or S-TAB with this setting never does any expanding of the common match. If I change it to "3", then it will expand but it will do it without pressing TAB (which I don't want, I end up with mixed up gobbledygook that way because I am still typing when it's expanding). So now I turn off incremental completion. Then the common match TAB key behavior works as described when set to "1". Is this a bug or am I missing something? Thanks for your help. -Jeff On Thu, Dec 20, 2012 at 5:30 PM, Drew Adams wrote: > > >> "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. > > > 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). > > > 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.) > > 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. > > > 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. > > --f46d0407152960bf2904d15dd7e4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Ok, so I've tried all the combinations of both the inc= remental completion, and common-match. I'm still totally confused by th= e behavior. =A0I think maybe there is a bug somewhere or I'm not unders= tanding something fundamental.

What I want is: =A0Only fill in stuff on the minibuffe= r (the common match) when I press tab. =A0Also, update the completions buff= er as I type.

I cannot get this behavi= or. =A0It appears that the "1" setting for common match simply do= esn't work. =A0It's supposed to only expand to the common match whe= n I press TAB or S-TAB, but actually it just does nothing. =A0Pressing TAB = or S-TAB with this setting never does any expanding of the common match. = =A0If I change it to "3", then it will expand but it will do it w= ithout pressing TAB (which I don't want, I end up with mixed up gobbled= ygook that way because I am still typing when it's expanding).

So now I turn off incremental completion. = =A0Then the common match TAB key behavior works as described when set to &q= uot;1".

Is this a bug or am I mis= sing something?

Thanks for your help.

<= /div>
-Jeff


On Thu, Dec 20, 2012 at 5:30 PM, Drew Adams <dre= w.adams@oracle.com> wrote:
> >> "M-SPC = runs the command icicle-prefix-word-complete, which is an
> >> interactive compiled Lisp function in `icicles-mcmd.el'.&= quot;
>
> 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.

> However the docs for icicle-word-completion-keys suggest that
> I can also bind SPC if I wanted. =A0That 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. =A0Icicles = 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 ins= ert a
space, rather than having to use `C-q SPC'. =A0Likewise, for `?' an= d `C-j'
(newline).

> 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.= =A0(Or
restart Emacs.)

Vanilla Emacs binds SPC to prefix word completion. =A0Icicles binds it, in = the
default value of `icicle-completion-key-bindings', to self-insertion in= sertion.
Likewise, `?' and `C-j'.

As I said, Icicles is used for completing lots of things besides just comma= nds
and file names, and it generally makes sense to have ` ', `?', and = `C-j' be
self-inserting. =A0But you can easily customize this away.

> There's one other odd behavior I've been noticing. =A0Even tho= ugh I have
> icicle-expand-input-to-common-match-flag

That option name should be without the `-flag'. =A0Long ago the o= ption was a
Boolean and its name had the suffix `-flag'. =A0Since you mention a val= ue of `1'
you clearly do not have an older version of Icicles where the option had th= at
former name.

> set to 1 (only expand when
> using tab or s-tab), I am finding that I do get input inserted for me<= br> > 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 f= ob 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. =A0It i= s what
Icicles calls incremental completion.

This explains common-match expansion:
http://www.emacswiki.org/emacs/Icicles_-_Expan= ded-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 differen= ces.
See the doc strings of `icicle-expand-input-to-common-match' and
`icicle-incremental-completion'.

HTH.


--f46d0407152960bf2904d15dd7e4--