From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Vitalie Spinu <spinuvit@gmail.com>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <jwvvcm0sqxn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874ntlng3l.fsf@gmail.com> (Vitalie Spinu's message of "Mon, 19 Mar 2012 09:35:10 +0100")
>>> 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
prev parent reply other threads:[~2012-03-19 12:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 11:05 Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion Vitalie Spinu
2012-03-16 12:18 ` Vitalie Spinu
2012-03-16 17:20 ` Stefan Monnier
2012-03-16 19:33 ` Vitalie Spinu
2012-03-17 22:34 ` Stefan Monnier
2012-03-17 22:43 ` Lennart Borgman
2012-03-17 23:33 ` Vitalie Spinu
2012-03-18 2:03 ` Stefan Monnier
2012-03-18 9:35 ` Vitalie Spinu
2012-03-18 15:42 ` Stefan Monnier
2012-03-18 19:18 ` Vitalie Spinu
2012-03-19 0:53 ` Stefan Monnier
2012-03-19 8:35 ` Vitalie Spinu
2012-03-19 12:49 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvvcm0sqxn.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=spinuvit@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.