[Top][All Lists]

[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: Vitalie Spinu
Subject: Re: Completion with (:exclusive 'no) is called twice, and doesn't pass over on sole completion.
Date: Sun, 18 Mar 2012 20:18:14 +0100
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux)

>>>> Stefan Monnier <address@hidden>
>>>> on Sun, 18 Mar 2012 11:42:27 -0400 wrote:

  >> 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.'

  > So, IIUC it would be perfectly OK for TAB completion to use the AC code.

Indeed, you could be right that always one-for-all completion function
might be made enough for the prefix completion. But I don't see how popup
menu can properly deal with partial completions for example, or
expansions a la yas. So you would still need a separate list for those.

And the old argument still stands - would the user like to have the same
redundant list of completion functions for C-M-i and popup menu?  

  >>> 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.

  > But I suspect it will generate false positives because it's not
  > specific enough.  Maybe "-completion-data"?

Maybe -c-a-p,  or -c-a-p-data? 


reply via email to

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