[Top][All Lists]
[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: |
Mon, 18 Jun 2007 09:15:23 -0700 |
> 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.
I might add that once you have the ability to type and change the regexp to
match dynamically, there is less raison d'etre for these
`customize-apropos-*' commands. An Icicles user would simply use
`customize-face' and so on, instead.
Well, not really. A multi-command version of each would first need to be
defined, so that `C-RET' etc. could DTRT. With RMS's proposed
`call-interactively' tweak, this step would presumably be unnecessary.
With Icicles (without RMS's `call-interactively tweak), here is, for
example, a definition of a multi-command `customize-face':
(defun icicle-customize-face (face)
"Customize face FACE."
(interactive (list (let ((icicle-candidate-action-fn 'customize-face))
(read-face-name "Customize face: "))))
(customize-face face))
Actually, because `customize-face' moves the frame focus to the Customize
frame, and you want to keep the focus on the minibuffer frame (which might
be a different frame) until you're done completing and acting on candidates,
this is what you really need:
(defun icicle-customize-face (face)
"Customize face FACE."
(interactive
(list (let ((icicle-candidate-action-fn
(lambda (x)
(customize-face x)
(select-frame-set-input-focus
(window-frame (minibuffer-window))))))
(read-face-name "Customize face: "))))
(customize-face face))
Also, there is the inconvenience that acting on all matching face names
would, in this case, open a separate Customize buffer for each. So, this is
not exactly equivalent to `customize-apropos-faces', and not quite as
convenient for customizing several faces.
Still, it does point out that having the ability to:
1) type a regexp at any time to match candidates and
2) act on any or all candidates (C-RET or C-!)
means that commands such as `(customize-)apropos-*' that ask for a regexp up
front are not quite so necessary.
Instead of entering a regexp once and for all to the prompt of such
commands, you can type the same regexp to any multi-command that acts on
such a candidate - in this case, a multi-command version of
`customize-face'.
And you can change that regexp on the fly, to correct it or to act on
different candidates. In `icicle-occur', for instance, you just start typing
a regexp and the matching lines become the search targets as you type - edit
the regexp and the search targets change (similar to `isearch-*-regexp').
An added specific advantage for `icicle-customize-face' is that, by using
`read-face-name' and `customize-face', you can see (WYSIWYG) the faces you
might choose to customize, in *Completions*. Even with the tweak to
`read-face-name' that provides this behavior generally,
`customize-apropos-faces' still shows plain face names as candidates,
because it does not use `read-face-name'.
Another advantage is of course on-the-fly help for individual faces: during
completion, `C-M-mouse-2' or `C-M-RET' on a face-name candidate shows the
face's doc string.
- Re: propose adding Icicles to Emacs, (continued)
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/16
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/16
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/17
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/16
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/16
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/17
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/17
- RE: propose adding Icicles to Emacs,
Drew Adams <=
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/25
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/25
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/25
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/25
- Re: propose adding Icicles to Emacs, Richard Stallman, 2007/06/26
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/26
- Re: propose adding Icicles to Emacs, Juri Linkov, 2007/06/25
- RE: propose adding Icicles to Emacs, Davis Herring, 2007/06/21
- Re: propose adding Icicles to Emacs, Lennart Borgman (gmail), 2007/06/21
- RE: propose adding Icicles to Emacs, Drew Adams, 2007/06/21