[Top][All Lists]

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

RE: icicles completion buffer

From: Drew Adams
Subject: RE: icicles completion buffer
Date: Thu, 15 Jan 2009 10:00:46 -0800

Hi Tomer,

> Icicle output the completion buffer items in non aligned way.
> is it possible that the completion buffer items will be lleft alligned
> like  a list this way is easier to find items.

Short answer: Set option `icicle-candidate-width-factor' to a number closer to
100% (default=70%). 100% ensures that all candidates will always be
left-aligned. I don't recommend that, however.

Long answer: You can have your cake and eat it too.

Icicles adjusts spacing and other properties of buffer *Completions* to provide
better placement of candidates. Depending on the particular set of candidates to
display, the heuristics used for this space management can be more or less
successful. In general, they do a very good job.

Typically, most candidates are in fact left-aligned by default, but that is not
the primary aim. Strict left-alignment, as in vanilla Emacs, can waste space,
especially when candidate widths are quite variable: the widest candidate
determines the column width for the others. Icicles makes more use of
*Completions* than vanilla Emacs, and you typically want to see more candidates
in a smaller space.

You can set preferences that fine-tune this behavior. All of the characteristics
of *Completions* buffer display are in the Customize group
`Icicles-Completions-Display'. Do `M-x customize-group
Icicles-Completions-Display' to see or edit them.

The particular options that are relevant for your question are these:

`icicle-inter-candidates-min-spaces' (default=1)
 Minimum number of spaces between candidates displayed in *Completions*.

`icicle-candidate-width-factor' (default=70)
 Percentage of widest candidate width to use for calculating columns.

Not only can you set these as you like as a general preference, but if you also
use library Do Re Mi then you can even change them on the fly, incrementally
adjusting the appearance for the current set of candidates. This is helpful,
because different sets of candidates have different width distributions, so they
have different optimal displays (and depending on your personal idea of

Do Re Mi is WYSIWYG: you see the effect as you make the change. You make this
on-the-fly adjustment using either `C-x |' or `C-x w' (during completion). After
hitting one of these keys, use the mouse wheel or the arrow keys to
incrementally adjust the appearance. (Hit some other key, e.g. `RET', to stop

Keys `up' and `down' adjust the inter-candidate spacing, and keys `left' and
`right' adjust the width factor. The mouse wheel adjusts candidate spacing if
you used `C-x |' and column width if you used `C-x w'.

Any adjustment you make using the Do Re Mi keys remains in effect afterward. If
you want to save the settings for future Emacs sessions, just visit Customize
and save the current values. So even if you want just to set the preferences
once and for all, using Do Re Mi is the best way to find the option values you
prefer, before saving them.

Cycling among candidates can also help with the effective visual alignment of
candidates. When the focus is the minibuffer, cycling is in candidate order,
left-to-right, then down the rows. If you use `C-insert' you can toggle the
focus between the minibuffer and *Completions*. When *Completions* has the
focus, the arrow keys cycle up/down in columns and left/right in rows. Moving
down a column can have the visual effect of compensating for entries that are
not strictly left-aligned - try it.

Do Re Mi:

reply via email to

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