From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel 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 Organization: EUR Message-ID: <87ehspogzt.fsf@gmail.com> References: <87haxoyff9.fsf@gmail.com> <87sjh8wdbw.fsf@gmail.com> <87haxmx0o7.fsf@gmail.com> <87d38aw8u1.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1332098605 26687 80.91.229.3 (18 Mar 2012 19:23:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Mar 2012 19:23:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 18 20:23:24 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S9LhM-0005QD-9R for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2012 20:23:24 +0100 Original-Received: from localhost ([::1]:49272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9LhL-0007qt-Lc for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2012 15:23:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9LhI-0007qR-KR for emacs-devel@gnu.org; Sun, 18 Mar 2012 15:23:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9LhG-0004Ei-M6 for emacs-devel@gnu.org; Sun, 18 Mar 2012 15:23:20 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:48547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9Lcc-0003Ti-0g for emacs-devel@gnu.org; Sun, 18 Mar 2012 15:18:30 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S9LcZ-0001Px-QM for emacs-devel@gnu.org; Sun, 18 Mar 2012 20:18:27 +0100 Original-Received: from e138158.upc-e.chello.nl ([213.93.138.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Mar 2012 20:18:27 +0100 Original-Received: from spinuvit by e138158.upc-e.chello.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Mar 2012 20:18:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: e138158.upc-e.chello.nl User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux) Cancel-Lock: sha1:JNtYe8vsbVPIgThQ2czTiF5PKB0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149121 Archived-At: >>>> Stefan Monnier >>>> 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 "-" prefix since I don't want to >>> consider all of this as part of Emacs's "core", but maybe we could >>> settle on "-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? Vitalie.