From: Vitalie Spinu <spinuvit@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion.
Date: Sun, 18 Mar 2012 10:35:02 +0100 [thread overview]
Message-ID: <87d38aw8u1.fsf@gmail.com> (raw)
In-Reply-To: <jwvmx7eu1pj.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 17 Mar 2012 22:03:44 -0400")
>>>> Stefan Monnier <monnier@iro.umontreal.ca>
>>>> on Sat, 17 Mar 2012 22:03:44 -0400 wrote:
>> A related issue. Position after 'aaaa, try to complete. You will get a
>> "Sole completion" message. Press "space" or "M-b", or whatever, you will
>> get a message "aaaa:" which means that completion is repeated after any
>> other command. This is really bad, as my completion is calling an
>> external process and stalls emacs for a second, badly interfering with
>> the editing.
> Again, you're confused: the completion-at-point-functions do not perform
> completion, they just return the data about what completion table to use
> at point.
Ok, I see it more clearly now, with your auto-complete point latter,
thanks. Will rewrite and see if it gets better.
(...)
>> I've written auto-complete support and emacs-24 completion at point
>> for R. And it turned out that these two are really distinct features.
>> One is fast, cache based and sloppy, as it should not interfere with
>> the editing. Another one is exact and might be very slow, because it
>> contacts the associated process. The TAB completions can afford to be
>> slow, as there is no editing.
> Interesting.
> So the completion candidates displayed in R-mode for auto-complete are
> different than the ones used for TAB?
Yes, and no. What I meant is that the underlying mechanisms are very
different. 99.99% of the time the completion candidates are the same,
but there are objects which are not meaningful to cache, like arguments
of the user functions, or components of the recursive structures (lists,
environments, data.frames etc.). In this cases AC also calls the
process, and it's usually fast. But in some extreme corner cases, like
if user changed a function in an attached package, AC will still use the
cached version.'
> Hmm... more consistency in the naming might be good here, indeed.
> It's important to keep the "<package>-" prefix since I don't want to
> consider all of this as part of Emacs's "core", but maybe we could
> settle on "<something>-completion-at-point-function" or maybe something
> shorter than that.
I am a fan of the -completion postfix convention. It's easy to match in
apropos, anything or IDO regexp: comint-filename-completion,
tags-completion, imenu-completion, imenu-in-same-mode-completion,
words-in-same-buffer-commpletion etc. It can get pretty long by itself,
so a short postfix is better.
Best,
Vitalie.
next prev parent reply other threads:[~2012-03-18 9:35 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 [this message]
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
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=87d38aw8u1.fsf@gmail.com \
--to=spinuvit@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.