all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* migrating from ido to icicles
@ 2012-12-19 19:11 jeffrey.m.weiss
  2012-12-19 22:41 ` Drew Adams
       [not found] ` <mailman.15718.1355956885.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: jeffrey.m.weiss @ 2012-12-19 19:11 UTC (permalink / raw)
  To: help-gnu-emacs

I'm trying to use icicles exclusively and not use ido anymore.

There's one sticking point left, and that's how icicles deals with filename completion.

The problem is with drilling down directory levels.  It seems to be that once completion is active, both TAB and the cycle keys do the same thing.  The only way to say "I accept the currently highlighted directory candidate, drill down to start completing the next one" is M-SPC.

This seems like way more keypresses than necessary.  When you're finding files, you're drilling directories more than matching filenames.  That has to be the case, because file-paths have many directory levels but only one filename.  

What I want is just for completion of filenames, for TAB to only activate completion, and if it's already active, do what M-SPC currently does. Leave cycling for keys bound specifically for that purpose.

Is that possible?  Doesn't seem available via config options, but maybe writing my own command and binding it to C-x C-f would work.



^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: migrating from ido to icicles
@ 2012-12-20 22:30 Drew Adams
  2012-12-21  3:53 ` Jeff Weiss
  2012-12-21 14:41 ` Jeff Weiss
  0 siblings, 2 replies; 14+ messages in thread
From: Drew Adams @ 2012-12-20 22:30 UTC (permalink / raw)
  To: 'Jeff Weiss', jeffrey.m.weiss, help-gnu-emacs

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




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

end of thread, other threads:[~2012-12-21 19:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 19:11 migrating from ido to icicles jeffrey.m.weiss
2012-12-19 22:41 ` Drew Adams
2012-12-20 14:51   ` Jeff Weiss
2012-12-20 15:45     ` Drew Adams
2012-12-20 21:11       ` Jeff Weiss
     [not found] ` <mailman.15718.1355956885.855.help-gnu-emacs@gnu.org>
2012-12-20 12:31   ` Michael Heerdegen
2012-12-21  0:10     ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2012-12-20 22:30 Drew Adams
2012-12-21  3:53 ` Jeff Weiss
2012-12-21 18:31   ` Drew Adams
2012-12-21 14:41 ` Jeff Weiss
2012-12-21 18:32   ` Drew Adams
2012-12-21 19:06     ` Jeff Weiss
2012-12-21 19:12       ` Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.