[Top][All Lists]

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

RE: trying out icicles

From: Drew Adams
Subject: RE: trying out icicles
Date: Tue, 19 Aug 2008 10:12:35 -0700

> on trying icicles persistent sets i can only access then with
> a C-x b which is bound to icicle-buffer (that is after i have
> defined and saved a named set (project)), is this right,
> i thought i could access then by the means of C-x C-f but it
> doesnt seem to work.

I'm not sure I understand you.

You can define any set of completion candidates, of any type, as a "saved
completion set". This tells how:

You can save any such set persistently (when you create it or later). This tells
how: (If a
"saved set" is not saved persistently, it is saved in a variable.)

You can retrieve any saved set (persistent or not) during completion for any
type of object (see the first URL for how). It makes sense to retrieve a set
only in a context where you can complete to names of objects of the type in the
set. For example, you could retrieve a set of command names when doing
buffer-name completion, but that wouldn't make much sense. In that context, it
makes sense to retrieve a set of buffer names. (You can have as many saved sets
as you like.)

Emacs file-name completion is special. The completion candidates are relative to
the current `default-directory'; they are not absolute file names. If you save a
set of these, it will look like this: ("foo.el" "bar.txt" "titi.el"). If you
retrieve such a candidate set when you are completing (e.g. with `C-x C-f'),
then you had better be in a directory that has such files, or else you will be
opening new files there with those names.

Icicles has two commands that do file-name completion differently from this.
They use absolute file names, so you can complete against any parts of the full
name (path). These commands are `icicle-locate-file' and `icicle-recent-file'
(plus `*-other-window' versions). If you save a set of completion candidates
when you use these commands, you save absolute file names. And the files whose
names you save need not be in the same directory. Example set:
("/projects/alpha/foo.el" "/projects/beta/foo.el" "/usr/local/whatever/titi.c").
This is what you want to do to create project file sets for different purposes.

If you save a set of buffer names when you use `icicle-buffer', the result is a
list of buffer-name strings, e.g. ("foo.el" "*Compile-Log*" "*grep*"). You can
retrieve this during file-name completion (e.g. `C-x C-f'), as you mentioned,
but unless you somehow have a buffer name that is an absolute file name, you
will have the same problem as for a set saved during `C-x C-f' (see above).

If you do have a saved set of absolute file names, you can retrieve it during
`C-x C-f'. That will work, even though `C-x C-f' uses relative names itself as
completion candidates. That is, even if the current `default-directory' is
unrelated to the directories in the saved absolute file names, the correct files
will be opened: an absolute file name means the `default-directory' is ignored.
(This is standard behavior for `C-x C-f'.)

If what I describe above is not what you see, and you think what you're seeing
is a bug, then please file a bug report: `M-x icicle-send-bug-report'.

reply via email to

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