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 13:39:47 -0700

> >     1. As I mentioned, my `read-face-name' just shows face names in
> >     *Completions* using their own faces. IMO, that should also
> >     be done in Emacs, but it is 100% independent of the rest of Icicles.
> >
> > This could be a good idea.  Can it be done by replacing the standard
> > `read-face-name' with yours?  Would someone please look at installing
> > this?
>
> Not a good idea in fact.  Face completions displayed in different faces
> are hardly readable, and some of them which have black foreground on black
> background (e.g. cursor, mouse, border) are not readable at all.

I find it _very_ helpful. What you say is true for only a few corner cases,
in general. A WYSIWYG show/no-show option that could be toggled from the
minibuffer during completion could easily deal with that.

FWIW, with Icicles there is really no great problem, because you can easily
get help on any candidate or just show its name in the minibuffer. For
instance, even if you can't read its name in *Completions*, and you can't
guess what it is by its position in the alphabetized list, you can use
`C-M-mouse-2' or `C-M-RET' to get help on the `border' face candidate during
completion - you then see this in buffer *Help*:

 Face: border (sample) (customize this face)
 Documentation: Basic face for the frame border under X.
 Defined in `faces.el'.

          Family: unspecified
           Width: unspecified
          Height: unspecified
          Weight: unspecified
           Slant: unspecified
      Foreground: unspecified
      Background: black
       Underline: unspecified
        Overline: unspecified
  Strike-through: unspecified
             Box: unspecified
         Inverse: unspecified
         Stipple: unspecified
 Font or fontset: unspecified
         Inherit: unspecified

This is the same as what you see in Customize, and, yes, the text "sample"
here would be blacked out because the face has a black background, by
default. This help is supplied on the fly - completion continues as before.
And even without asking for help, whenever `border' is the current candidate
(e.g. by cycling) `border' appears in the minibuffer, without its face.

I'd say we shouldn't throw out the baby with the bathwater on this (he said,
hazarding comments about which is which) - the gain of showing faces far
outweighs the loss. It is a zillion times easier and quicker to pick a face
name among a long list of possibly similar names by looking for the face
appearance also, not just the name. Likewise for colors and color names. See
the effect of both here:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Text_Properties_in_Completio
ns.

The faces screenshot on that page shows the problem you mention for
`border', BTW (but not for `cursor', because I don't use the default black
background for it). It also demonstrates what you said about some faces
being difficult to read (e.g. light color against a light *Completions*
background). It is a representative screenshot, I think, so people can get a
good idea of both (-) the importance of the problem and (+) the value of
WYSIWYG.

For any given user color scheme and background mode, the vast majority of
faces will be quite readable on the user's *Completions* background -
otherwise, they would not be part of the scheme. What I mean is that if a
user uses a dark background, for instance, then it is likely that most of
the faces will be readable against a dark background. Of course, "most" is
not "all", and I do see your point. I suggest adding a user option and a
toggle for it in the minibuffer completion maps.

FWIW - I haven't (yet) added such an option and toggle to Icicles. I use
face-name completion all the time and I've never noticed a need for it, but
I do think it is a good thing to add. The toggle key-binding could be added
permanently or added only temporarily from the code of `read-face-name'
itself (and removed afterward). Likewise for `icicle-read-color' - a single
option and toggle command would be used for all such WYSIWYG *Completions*
displays.

BTW - Fonts are another candidate for this type of treatment. It is standard
on Windows, at least, to show font names in menus in their own fonts.
Likewise, for most publishing applications. It really makes choosing a font
much, much easier. Think too of `xselfont'.

> >     4. My `completion-setup-function' and `display-completion-list'
> >     - see what I wrote before (about fitting the *Completions*
> >     window to the buffer etc.). This would mean modifying the
> >     definitions of `completion-setup-function' and
> >     `display-completion-list' in ways that I think would be
> >     good anyway. For instance, my `display-completion-list' does
> >     not remove text properties from candidates, and it adjusts
> >     the number of displayed columns and their widths.
> >     I personally would prefer to see `display-completion-list' be a Lisp
> >     function, but I will survive without that. My enhancements to it are
> >     independent of the rest of Icicles, but they do matter to
> >     the Icicles
> >     experience ;-).
> >
> > I am not sure what that previous text that refers to, but someone can
> > look at these changes and think about installing them.  Would someone
> > please do?
>
> Do you mean rewriting `display-completion-list' in Lisp?

I have done that (and included the enhancements mentioned). See
icicles-fn.el for the code.






reply via email to

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