[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: Sat, 16 Jun 2007 13:53:18 -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?

Yes. It is not dependent on the rest of Icicles in any way.

> Would someone please look at installing this?
>     2. Same thing for `face-valid-attribute-values': It shows
>     color names using the colors they name. Good to add to Emacs,
>     and independent of the rest of Icicles.
> Likewise.

Yes, likewise.

>     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,

>From my mail in this thread from Mon 6/11/2007 11:34 AM (your time might

| As another example, `completion-setup-function' is modified so that it
| not print the help lines at the top of *Completions*. That printing is
| instead in [my version of] `display-completion-list', so that the
| *Completions* window can be fit to the buffer. Icicles formats the
| *Completions* display "intelligently", determining a useful number of
| columns and height, and it fits the window to the formatted buffer.
| (This formatting, e.g. column and default window width, is under the
| control of user options.) That is an enhancement that we might want to
| consider for vanilla Emacs.

My version of `display-completion-list' is a Lisp transcription of the C
function in Emacs, to which I then added the enhancement just described.
These comments in the source code (icicles-fn.el) describe all of the
Icicles enhancements to `display-completion-list':

1. Does not remove text properties from candidates when it displays them in
*Completions*. [I think I persuaded you already to do this in Emacs. It may
already be in Emacs 22.]

2. Adjusts number of columns and their widths to window size.

3. The optional second arg is ignored.  In the vanilla Emacs version, this
is a string representing a common prefix, and faces
`completions-first-difference' and `completions-common-part' are used on

#3 is necessary for Icicles because Emacs hard-codes application of these
faces. Icicles doesn't need this and it gets in the way. Icicles highlights
the common parts in a better way for Icicles (and in a way that is under the
control of the user).

FWIW, I personally prefer that `display-completion-list' be in Lisp,
precisely because it is easier for users to tweak (as I did). *Completions*
display is, IMO, the kind of thing that third-party libraries might want to
or even need to customize. I don't see the point of having such code in C.
Having to transcribe the C code to Lisp, in order to then customize it, is a
chore that shouldn't be necessary. I avoided it for a long time, until I got
to the point where I wanted to do #2, for which there was no other solution.

reply via email to

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