emacs-devel
[Top][All Lists]
Advanced

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

Re: Completion with (:exclusive 'no) is called twice, and doesn't pass o


From: Stefan Monnier
Subject: Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion.
Date: Mon, 19 Mar 2012 08:49:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

>>> or expansions a la yas.
>> I guess you're referring to some part of yasnippet, but I don't know
>> which part, nor why it is related to completion-at-point-functions.
> Yes, I mean the expansion of abbreviations at point, like yasnippet
> does.  But, it looks like you don't consider it as a completion in the
> first place.

I don't know yasnippet's abbreviation's expansion behavior, but assuming
it works basically along the same lines as abbrev, then the completion
part is only the part that finds an abbrev based on the text already
typed (and there may be several such abbrevs, so you get the usual
behavior of completions), whereas the expansion is a post-processing
step which only happens if the completion found a single candidate (and
this is performed with the :exit-function that can be set in
completion-data's `props').
See bibtex.el for an example use of this functionality.

>> I used "-capf" within the code of completion-at-point, but I think it's
>> too cryptic for use outside of that context.
> Sounds great to me! It's easy to spell, search for and remember, and is
> more specific than -data. At the end it's just a convention to be used
> to, and from each function's documentation it will be clear what it
> means.

Then maybe we should go with "-completion-capf" (more specific
than -data, but still makes it clear it's related to completion, even
for people not familiar with -capf).


        Stefan



reply via email to

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