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 10:35:02 +0100 Organization: EUR Message-ID: <87d38aw8u1.fsf@gmail.com> References: <87haxoyff9.fsf@gmail.com> <87sjh8wdbw.fsf@gmail.com> <87haxmx0o7.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1332063327 26375 80.91.229.3 (18 Mar 2012 09:35:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Mar 2012 09:35:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 18 10:35:26 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 1S9CWK-0006mb-DA for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2012 10:35:24 +0100 Original-Received: from localhost ([::1]:38449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9CWJ-00026o-I2 for ged-emacs-devel@m.gmane.org; Sun, 18 Mar 2012 05:35:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9CW8-0001jf-QA for emacs-devel@gnu.org; Sun, 18 Mar 2012 05:35:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9CW3-00022p-5w for emacs-devel@gnu.org; Sun, 18 Mar 2012 05:35:12 -0400 Original-Received: from mail-ee0-f41.google.com ([74.125.83.41]:37973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9CW2-00020g-Sc for emacs-devel@gnu.org; Sun, 18 Mar 2012 05:35:07 -0400 Original-Received: by eeke53 with SMTP id e53so2774109eek.0 for ; Sun, 18 Mar 2012 02:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=motRMI9Xo5gRx7buIuZyHy2ev+qugyz5Dpt5n9PW1+E=; b=0O4O3UfVOHWp+Lt4FJFv7wPfavZjAy0Hra50706HWIIH8nogyMFSgbhIKhWQgCLpyC qO8lFelsXxSSoFv5YLLW5+IwIMjEr1i2sz8iOFs1IduN8ch7vwjoK0Ks3fKWkKjSDa9y 3yOci0pwqZkgRQOpMzBMxqntGAo62STTLt/JvuEczIwGr8em5qVQ52o6Tjqj776gTqbo gHFkLzxDm1TCEkAtecf3o+3/MSs1W20/MyPMFymevXzC9p8EydqW01Rtbq6Bf3srvJzm O0RMKma531grH94PZ1Zeg1dDAmUNLcHO0IUYxnz4va/gCmqcp7/i6OQhuyMbNi0TjfuP MYgQ== Original-Received: by 10.14.120.210 with SMTP id p58mr1037176eeh.98.1332063304825; Sun, 18 Mar 2012 02:35:04 -0700 (PDT) Original-Received: from localhost (e138158.upc-e.chello.nl. [213.93.138.158]) by mx.google.com with ESMTPS id u9sm37249522eem.11.2012.03.18.02.35.03 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Mar 2012 02:35:03 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 17 Mar 2012 22:03:44 -0400") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.83.41 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:149119 Archived-At: >>>> Stefan Monnier >>>> 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 "-" 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. Best, Vitalie.