[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

propose adding Icicles to Emacs

From: Drew Adams
Subject: propose adding Icicles to Emacs
Date: Fri, 8 Jun 2007 08:52:14 -0700

Juri's Info suggestion provides a good opportunity to propose adding Icicles
to Emacs:

> BTW, I have an idea to improve the `i' commands in the
> Emacs Info browser. Its main drawback currently is that it
> forces the user to cycle through many Info nodes before
> arriving to the desired one.  We could create a new
> command `Info-index-occur' that will ask the user for the
> index substring and display a list of references from Index
> nodes that contain the given substring.  Then the user can
> visit a selected index item in such subindex node.

With Icicles, when you use `i' in Info:

* You can complete your input using an index-entry
  prefix (standard Emacs) or a regexp (e.g. substring).
  Completion candidates are updated to reflect your input.

* You can hit `M-*' and then type different input, to also
  match that (e.g. multiple regexps). Do this any number
  of times.

* You can use a key or mouse-click to visit individual matches
  - without exiting `i' completion.

* You can use keys to cycle among matches, in either direction.
  You need not cycle among all intermediate matches.

* You can visit any number of nodes that match, without leaving
  your (single) `i' invocation.

* Because you browse (cycle etc.) without leaving completion,
  your input continues to filter candidates - regexp or prefix.
  Change your input on the fly to change the match set for

* Hit `RET' or `C-g' to stop browsing (i.e., end `i'
  invocation) at a match you finally choose.

The same approach works also for `g' in Info. These features for `i' and `g'
come essentially for free - a couple lines of code implements them for

I've now signed papers and sent them in, so adding Icicles to Emacs could be

Icicles extends `completing-read', `read-file-name' etc. in various ways. It
provides users with yet another way to complete minibuffer input (like ido,
ibuffer,...). I propose adding it to Emacs in a way similar to how ido and
ibuffer are offered: for optional use. Icicles is encapsulated in a minor
mode, and turning the mode off gives you back vanilla Emacs. On the other
hand, we might want to also add some of its ideas directly to vanilla Emacs,

Icicles has many different features, including the following
(in addition to what was mentioned above about Info `i'):

* Its features are available for all kinds of completion:
  file, buffer, command,...even keys. The user interface is
  the same for all.

* Multi-commands: Define a command that acts on one foobar,
  and be able to use it also on multiple foobars in a single
  invocation. Visit multiple index entries with one `i' (see
  above). Use `C-h f' to browse the *Help* for any number of
  functions whose names match your input (like apropos on the
  fly, with full doc strings). Open selected files that match
  your input, with a single `C-x C-f'.

* You use completion with multi-commands the same way you use
  it to choose a single completion candidate. Instead of `RET'
  or `mouse-2' or (to cycle) `down', you use `C-RET' or
  `C-mouse-2' or `C-down' to act on a candidate without exiting
  completion. The standard keys work the standard way, so there
  is no change in behavior if users don't explicitly use the
  multi-command keys. (Advanced features require you to invoke
  them explicitly, so beginners don't fall down a black hole.)

* Match negatively: Type input to match, then complement that
  set of matches. Repeat complementing with different inputs,
  to remove whole subsets of uninteresting candidates from
  consideration (and from further matching). Or use a key or
  the mouse to remove candidates individually.

* Use other set operations on the set of matching candidates,
  including acting on all of them (`C-!'). That is, apply the
  current command to each matching candidate. E.g.,
  delete/open/... all matching files (or buffers or...).

* Use multi-commands as multiple-choice menus: choose any
  number of matching candidates in *Completions*. Choose (act
  on) the same candidate multiple times, if appropriate.

* Sort the current set of candidates in various ways, on the
  fly. This affects cycling order. Different commands can
  make different sort orders available.

* Use multiple regexps to search text. This is an incremental
  search, but you need not go through each match in sequence:
  As for index entries (see above), you can skip around
  (direct access), cycle among hits, etc. Search for regexp
  subgroups within the regexp context. Combine predicates with
  syntactic search, on the fly. Use all of the completion
  features, such as complementing to remove whole subsets of
  uninteresting search hits.

* Same search mechanism for compilation hits, imenu
  definitions, occur,... Search across multiple buffers,
  files, or saved regions. Search only text with given text
  properties or overlay properties, such as faces.

* Replace text while searching: invoke replacement on the fly.
  No separate query-replace, and no need to cycle through each
  replacement candidate in only one order. Replace text during
  character-property search too. Use any replacement string
  accepted by 'query-replace-regexp'.

* Persistently save and reuse matching sets of candidates.

* Complete key sequences too - e.g. `C-x S-TAB' completes to
  the keys in `C-x' prefix map. Same completion possibilities
  as usual (multiple patterns, regexps, cycling,...).

* For Emacs-Lisp programmers, just use `completing-read' or
  `read-file-name' - users get most of the Icicles features
  with no programming. Or define commands as multi-commands:
  it's as easy to define a command to act on one or more
  foobars as it is to define a command that only acts on one.

There is a lot more. The doc is here:
An overview is here:

The library is big: several files. Much of that is doc. There
are many user options: being very general, you can use it in
different ways, and you can customize it accordingly.

Please consider adding Icicles to Emacs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]