[Top][All Lists]

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

Re: completing-read return meta-information?

From: Stefan Monnier
Subject: Re: completing-read return meta-information?
Date: Wed, 16 Sep 2015 21:38:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> There is a desire to refactor this so that the only difference is inside
> the completion table.

I think the uniquification shouldn't be done in the completion table.

All the fancy rewriting to make things shorter should be done in the
completion-style, instead.  The style code can choose to return different
kinds of results for completion-all-completions (which gets displayed
in *Completions*, in Company, or in Icomplete-mode and where we should
try and reduce redundancy) and for completion-try-completion.

So completion-all-completions can return names like "foo<bar>" while
completion-try-completion can return "~/src/file/foo/toto/bar.agda".

Another option is to use a completely different completion code
(e.g. that's what filecache.el does).

> 1) The completion table can add the absolute path in an `abspath' text
>    property of the completion string.

I generally don't like the idea that the same text would fail to behave
in the same way when written by hand by the user (in which case it
won't have that text-property).


reply via email to

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