From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <87haxoyff9.fsf@gmail.com> <87sjh8wdbw.fsf@gmail.com> <87haxmx0o7.fsf@gmail.com> <87d38aw8u1.fsf@gmail.com> <87ehspogzt.fsf@gmail.com> <874ntlng3l.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1332161375 9501 80.91.229.3 (19 Mar 2012 12:49:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2012 12:49:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 13:49:32 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 1S9c1j-0001B5-Lu for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2012 13:49:31 +0100 Original-Received: from localhost ([::1]:52742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9c1j-00057j-4J for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2012 08:49:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9c1d-00056y-1m for emacs-devel@gnu.org; Mon, 19 Mar 2012 08:49:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9c1X-0004Ub-Ss for emacs-devel@gnu.org; Mon, 19 Mar 2012 08:49:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:26664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9c1X-0004UW-Ok for emacs-devel@gnu.org; Mon, 19 Mar 2012 08:49:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCpf3/2dsb2JhbACBX5x7eYhwnhmGGQSbGYQJ X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="168863360" Original-Received: from 76-10-151-247.dsl.teksavvy.com (HELO pastel.home) ([76.10.151.247]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Mar 2012 08:49:17 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 76F8759443; Mon, 19 Mar 2012 08:49:17 -0400 (EDT) In-Reply-To: <874ntlng3l.fsf@gmail.com> (Vitalie Spinu's message of "Mon, 19 Mar 2012 09:35:10 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:149128 Archived-At: >>> 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