help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: basic using icicels


From: Drew Adams
Subject: RE: basic using icicels
Date: Thu, 4 Sep 2008 09:02:18 -0700

Hi Tomer,

> Thanks, I have tried it it works only in start of buffer.
> when i use it in the middle of of bufffer the icicles tries to
> complete the word backwords to the cursor.

Sorry, I have no idea what you mean by "complete the word backwards to the
cursor".

If you feel you've found a bug, please report it: `M-x icicle-send-bug-report'.
Please give a precise, step-by-step recipe, starting with emacs -Q. FYI: Read
node "Bugs" in the Emacs manual, particularly subnode "Understanding Bug
Reporting".

This is the intended behavior:

1. If the text before point can be completed as a prefix, it is. Completion
candidates are provided in *Completions*. The candidates are those determined by
dabbrev.

2. Otherwise, if your minibuffer input is empty, then all words are presented as
candidates. (All words in all buffers, if you use `C-u C-u'.)

3. Otherwise (your input is not empty, and there are no matching candidates), a
message tells you there are no completions.

#1 and #3 are the same as for vanilla Emacs command `dabbrev-completion'. In
particular, wrt #1, whenever text before point can be completed, it is. See the
dabbrev doc for how it determines whether the text before point can be completed
and which words are chosen as candidates.

This is where `icicle-dabbrev-completion' differs from vanilla
`dabbrev-completion':

* In #2 above - vanilla dabbrev just raises an error saying sorry, no
completion.

* You can use minibuffer completion to choose a candidate in *Completions*.
Vanilla dabbrev does not use the minibuffer for completion.

* You can use all Icicles completion enhancements to choose a candidate: apropos
completion, progressive completion, chipping away stuff you don't want, etc.

> Is there an option to 'tell" icicles that if there is space before the
> cursor and exeucte completion , then the  icicles would give me ALL
> words in ALL buffers ?

No. See #1 above. Icicles uses the same criteria as vanilla dabbrev for deciding
whether the text before point can be completed. And it uses the same initial set
of candidates. 

My guess is that this is what you are running into. You seem to be expecting
that a space before point means there can be no matching completions. Dabbrev
thinks differently - it often lets you complete text before point even when
there is a space.

This is by design (feature, not bug), and it is unrelated to Icicles. That is,
Icicles (at least so far) does not try to be smarter than dabbrev in this
regard. I've assumed that dabbrev's determination of whether a completion is
possible is pretty good. Icicles only provides you additional completion
features, once dabbrev has determined that completion is possible.

Nevertheless, there are some dabbrev user options that might affect this
determination (what gets completed, in which contexts). Please take a look: `M-x
customize-group RET dabbrev'.

> in other words Is possible the use ALL words in ALL buffer not just in
> the start of buffer ?

Yes, but only when there is no completion for the text at point. And the vanilla
dabbrev design is used for that determination.

There are many contexts in "the middle of of bufffer" where, if your input is
empty, (a) vanilla Emacs raises a no-match error and (b) Icicles provides all
completions (from all buffers, if you use C-u C-u) as candidates. Experiment a
bit and you will see this.

But there are other contexts in the middle of the buffer, including sometimes
after a space, where dabbrev (and Icicles) determines that completions are
available for the text preceding point, and it presents only those completions
as candidates.

Suggestion: Play with vanilla `dabbrev-completion' a while, to get to know what
it does, how it works, and what its limitations are. Then play with
`icicle-dabbrev-completion'. Then, if you think you have a useful concrete
suggestion, please send it along. Or if you find a bug, send that along. 

But please let yourself get to know the existing design a bit first. That will
inform any suggestion or bug report you send, helping you to keep it specific.

`icicle-dabbrev-completion' was not intended as a completely different way to
complete words in a buffer. The idea was just to improve on the completion
mechanism. But I'm open to suggestions.






reply via email to

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