emacs-devel
[Top][All Lists]
Advanced

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

RE: propose adding Icicles to Emacs


From: Drew Adams
Subject: RE: propose adding Icicles to Emacs
Date: Sun, 17 Jun 2007 15:18:15 -0700

>     > I don't understand why it makes sense to do completion on regexps.
>     > Would you please explain?
>
>     This is, in my experience, the single most important (useful)
>     feature that Icicles has to offer. It is way out in front of
>     any other Icicles feature or combination of features in terms
>     of its practical value. The benefits are
>     well documented in the doc I sent you (which is also on the wiki).
>
>     Two of the basic features of Icicles are (1) cycling among matching
>     candidates and (2) being able to match a regexp, not just a prefix.
>
> Are we talking about the same thing?  I am talking about this
>
>     2. My `customize-apropos', `customize-apropos-faces',
>     `customize-apropos-groups', `customize-apropos-options', and
>     `repeat-complex-command' all use `completing-read' to read the regexp.
>
> but you seem to be talking about entering a regexp
> to do completion feature.

Yes, we were not talking about the same thing - I misunderstood you; my bad.

To answer your question about `customize-*' -

Here is my definition of `customize-apropos-faces':

(defun icicle-customize-apropos-faces (regexp)
  "Customize all user faces matching REGEXP.
Use `S-TAB', [next], and [prior], to match regexp input - this lets
you see what items will be available in the customize buffer."
  (interactive
   (list (completing-read "Customize faces (regexp): "
                          obarray 'custom-facep nil nil
                          'regexp-history)))
  (customize-apropos regexp 'faces))

This means that, when prompted, you can do any of the following:

1. type a regexp and hit RET, to get customize for the matching
   faces - this is the same as what vanilla Emacs offers

2. type a regexp and hit S-TAB, to see the matching face names
   as candidates in *Completions* and then do one of the following:

 (a) change your regexp, either to narrow the choices further or
     to correct it if it didn't quite match what you expected

 (b) use `M-*' to add another match pattern, to narrow candidates
     down progressively

 (c) choose one or more candidate faces to customize, from the
     list of those that match, using `C-mouse-2' or `C-RET' or
     (finally) `RET'

3. hit TAB or S-TAB (without typing any input), to get a list of all
   faces as candidates, and then act as in 2a, 2b, or 2c

In the vanilla Emacs `customize-apropos-faces', you must provide a regexp
once and for all, with RET - there is no completion of face names available,
and no way to rectify your regexp without starting over.

This is a good example of the general advantage of regexp matching on the
fly, and the advantage of providing input by completion whenever possible.






reply via email to

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