GNU bug report logs - #12852
24.2; `exit-function' not supported in completion table's metadata alist

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Leo <sdl.web@HIDDEN>; dated Sat, 10 Nov 2012 07:30:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 2 Dec 2012 05:44:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 02 00:44:19 2012
Received: from localhost ([127.0.0.1]:49163 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tf2Li-0002iB-Qk
	for submit <at> debbugs.gnu.org; Sun, 02 Dec 2012 00:44:19 -0500
Received: from mail-pb0-f44.google.com ([209.85.160.44]:63295)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <sdl.web@HIDDEN>) id 1Tf2Lg-0002i3-3H
	for 12852 <at> debbugs.gnu.org; Sun, 02 Dec 2012 00:44:17 -0500
Received: by mail-pb0-f44.google.com with SMTP id uo1so1227255pbc.3
	for <12852 <at> debbugs.gnu.org>; Sat, 01 Dec 2012 21:41:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:references:face:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	bh=dlftajeZr0W1+r/X5F0mwKPvSAfNE1DkWXY/99ffcpU=;
	b=ss5ZrdqSNF1ezdyia4vVKVsO7T2QCRZRZmAWRPwmr4NdEhnZRLC0mbBcXmmCt+ZfxU
	tHiRO/aqrnaNYkTnyvE4L8jdoYn7PKkunUZtBhztX4enRfpX9M5c7Msq+QQ6ZL41MXm+
	Uti8IttfTjDRe/PKe3VfZl43f8+xo7DGm74z2uqOTXRpNptp/ldUxkN6YGYzOhxmGePP
	FVxCRPmIoOcsXf88FcWocq1XGGBGCqagmeehqnBhymLLkOGWUpkX0kywxlkvCRMHyIIk
	AbCWH+sLZVoLPJY1ApNek2mX1JAtKmQR8ywKBqPTR4gbaaZ6SF6vFx42odZPAtOI6wBc
	umwQ==
Received: by 10.66.73.225 with SMTP id o1mr15909173pav.70.1354426918223;
	Sat, 01 Dec 2012 21:41:58 -0800 (PST)
Received: from localhost ([119.255.41.67])
	by mx.google.com with ESMTPS id hc4sm5831048pbc.30.2012.12.01.21.41.54
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 01 Dec 2012 21:41:57 -0800 (PST)
From: Leo <sdl.web@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN> <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
	<m1mwyonner.fsf@HIDDEN> <jwvd2zknmtr.fsf-monnier+emacs@HIDDEN>
	<m1ehk0nkxs.fsf@HIDDEN> <m2624xatqe.fsf@HIDDEN>
	<jwvhaohc6t6.fsf-monnier+emacs@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ
	WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw
	SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F
	x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0
	nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+
	U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp
	FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs
	3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd
	gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR
	ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk
	fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv
	rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C
	YII=
Date: Sun, 02 Dec 2012 13:41:41 +0800
In-Reply-To: <jwvhaohc6t6.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Thu, 22 Nov 2012 22:58:19 -0500")
Message-ID: <m2obidko2y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (OS X 10.8.2)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On 2012-11-23 11:58 +0800, Stefan Monnier wrote:
> Clearly, with the current code base, adding "." is the
> easiest solution.  You can also strip any final dot in the user's input,
> so the odd final dot is only a temporary artifact in the minibuffer.

This seems to get in the way if you use the table for
completion-at-point.

>
> But you do have some good points about exit-function, which might
> justify redesigning it, or providing some similar functionality in
> completion-metadata.  But I need to think more about what that should
> look like.

OK, thanks for the thinking ;)

Leo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 23 Nov 2012 03:59:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 22 22:59:48 2012
Received: from localhost ([127.0.0.1]:33758 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TbkQd-0005ow-Lh
	for submit <at> debbugs.gnu.org; Thu, 22 Nov 2012 22:59:48 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:29694)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>)
	id 1TbkQa-0005ok-Vy; Thu, 22 Nov 2012 22:59:45 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FpaQ6/2dsb2JhbABEtBGBCIIVAQEEAVYjEAs0EhQYDSQuh24FugmQRAOIQppxgViDB4E4Gg
X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="208276405"
Received: from 69-165-164-58.dsl.teksavvy.com (HELO pastel.home)
	([69.165.164.58])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	22 Nov 2012 22:58:20 -0500
Received: by pastel.home (Postfix, from userid 20848)
	id A70B4597C9; Thu, 22 Nov 2012 22:58:19 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Leo <sdl.web@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
Message-ID: <jwvhaohc6t6.fsf-monnier+emacs@HIDDEN>
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN> <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
	<m1mwyonner.fsf@HIDDEN> <jwvd2zknmtr.fsf-monnier+emacs@HIDDEN>
	<m1ehk0nkxs.fsf@HIDDEN> <m2624xatqe.fsf@HIDDEN>
Date: Thu, 22 Nov 2012 22:58:19 -0500
In-Reply-To: <m2624xatqe.fsf@HIDDEN> (Leo's message of "Fri, 23 Nov 2012
	11:22:33 +0800")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

>> I mean I might be subverting the exit-function.  Any suggestions?
> Any comments on what is the best thing to do?

Clearly, with the current code base, adding "." is the
easiest solution.  You can also strip any final dot in the user's input,
so the odd final dot is only a temporary artifact in the minibuffer.

But you do have some good points about exit-function, which might
justify redesigning it, or providing some similar functionality in
completion-metadata.  But I need to think more about what that should
look like.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 23 Nov 2012 03:24:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 22 22:24:17 2012
Received: from localhost ([127.0.0.1]:33730 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TbjsH-00050y-7b
	for submit <at> debbugs.gnu.org; Thu, 22 Nov 2012 22:24:17 -0500
Received: from mail-pb0-f44.google.com ([209.85.160.44]:61537)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <sdl.web@HIDDEN>) id 1TbjsF-00050r-Kz
	for 12852 <at> debbugs.gnu.org; Thu, 22 Nov 2012 22:24:16 -0500
Received: by mail-pb0-f44.google.com with SMTP id uo1so5934411pbc.3
	for <12852 <at> debbugs.gnu.org>; Thu, 22 Nov 2012 19:22:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:references:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	bh=+YmlHA3X1VMuaDtfWKWaRGASSdeAlMJ7nEog7SVciA8=;
	b=VATBiZ30I9AL96XlXLCaxHp56CDgsdDd04lKtRiijNneLcRf7hlm0kUL5Uyeeyi37d
	xOjfm1P1CBJZkjvBEM7RTsNK5S7kf8FLp2aXXjp3wPMXywCDESUemP2HrkU7aaGjqLTF
	1eHLw9lXLsZ0H9uq9x+2xcOQ5E4QP5qio+uIyX7hPe2JOPcpx6py9mf5+KTCEvAzvucM
	cnWDKz86xrGF8+pbiw6219Dllnkm07vNWoMCDORBQPchOYi6p+CkBX9lp7Pfu2yEBAEv
	EP3YLtD/Mr1LZVBV/rTbk4bTw9b5uu7d/H2JkeOc6eSGRVBVflc/mZKFXc/UqG0eeNjk
	lpTw==
Received: by 10.68.233.201 with SMTP id ty9mr10743267pbc.14.1353640971311;
	Thu, 22 Nov 2012 19:22:51 -0800 (PST)
Received: from localhost ([119.255.41.67])
	by mx.google.com with ESMTPS id mn5sm3036105pbc.12.2012.11.22.19.22.44
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 22 Nov 2012 19:22:50 -0800 (PST)
From: Leo <sdl.web@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN> <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
	<m1mwyonner.fsf@HIDDEN> <jwvd2zknmtr.fsf-monnier+emacs@HIDDEN>
	<m1ehk0nkxs.fsf@HIDDEN>
Date: Fri, 23 Nov 2012 11:22:33 +0800
In-Reply-To: <m1ehk0nkxs.fsf@HIDDEN> (Leo's message of "Mon, 12 Nov 2012
	00:50:07 +0800")
Message-ID: <m2624xatqe.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (OS X 10.8.2)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.7 (/)

On 2012-11-12 00:50 +0800, Leo wrote:
>> Not sure which of the two you think is probable.  Maybe the "neat hack"
>> is the more probable one.
>
> I mean I might be subverting the exit-function. Any suggestions?

Hello Stefan,

Any comments on what is the best thing to do?

Leo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 11 Nov 2012 16:50:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 11 11:50:55 2012
Received: from localhost ([127.0.0.1]:33378 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TXakI-0004TO-Nb
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 11:50:55 -0500
Received: from mail-pa0-f44.google.com ([209.85.220.44]:36459)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <sdl.web@HIDDEN>) id 1TXak1-0004T3-Va
	for 12852 <at> debbugs.gnu.org; Sun, 11 Nov 2012 11:50:52 -0500
Received: by mail-pa0-f44.google.com with SMTP id fb11so3791047pad.3
	for <12852 <at> debbugs.gnu.org>; Sun, 11 Nov 2012 08:50:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:references:face:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	bh=UNbpGhlVECV8/VbyxReFsV2zPIJcix6X+aAe9fLyNgY=;
	b=Qqo7lEuy1mZGanNBGlj5IOjVc/APvv3Q/uxELt4WZ+tWhMosd7m9uAPjrB3tseVbSG
	VlXCvdgf/kRBMhcyzrOotRRNSvJJqUbUGPqyN3SSer8+sx6dvRpVkhUlNQFlCt9g6YiB
	sx5ZLpYA9/OaGXQXmNJVYl82Ykvo75bXWdktIt8oqpvYeQHLBAyGs1VBqdXzrIo+y/X6
	SJz/x80nxv5CScvtdwLGRh6QkaKhNb7NlbqqocSCGY1e0wP61tdguWDzT8RmL6pcjt48
	2LfCcJK4tGSzgbFeIvyxUiNpRbAEat8CJAX+N+xxMA80f1aiUbrWlkLgvcdzGfuvloVI
	pxLw==
Received: by 10.66.81.199 with SMTP id c7mr48254769pay.19.1352652617714;
	Sun, 11 Nov 2012 08:50:17 -0800 (PST)
Received: from localhost ([182.48.109.8])
	by mx.google.com with ESMTPS id vs3sm2720916pbc.61.2012.11.11.08.50.13
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 11 Nov 2012 08:50:16 -0800 (PST)
From: Leo <sdl.web@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN> <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
	<m1mwyonner.fsf@HIDDEN> <jwvd2zknmtr.fsf-monnier+emacs@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J
	kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA
	AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3
	CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o
	uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c
	MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII=
Date: Mon, 12 Nov 2012 00:50:07 +0800
In-Reply-To: <jwvd2zknmtr.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Sun, 11 Nov 2012 11:21:19 -0500")
Message-ID: <m1ehk0nkxs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (OS X 10.8.2)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.7 (/)

On 2012-11-12 00:21 +0800, Stefan Monnier wrote:
> Any reason not actually add the ".", just like file-name completion
> actually adds the / ?

This is another way to do it. But it looks unnatural. For example, it is
not uncommon to use /usr/bin/ for a directory name but not usr.bin. for
a python pkg.

>> So for example, twisted.inte should complete to twisted.internet with
>> minibuffer message [package] to mean that twisted.internet is a package.
>
> Right, so it's like an annotation but only displayed when you select
> that particular entry.
>
>>>> Looks like with some change to completion--done we can have this.
>>>> What do you think?
>>> I have the impression that you're subverting exit-function.
>>> I"m not sure yet if it's a neat hack, or if there's a better way to do it,
>> Probably.
>
> Not sure which of the two you think is probable.  Maybe the "neat hack"
> is the more probable one.

I mean I might be subverting the exit-function. Any suggestions?

Leo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 11 Nov 2012 16:21:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 11 11:21:42 2012
Received: from localhost ([127.0.0.1]:33346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TXaI2-0003qR-4x
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 11:21:42 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:12055)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TXaI0-0003qK-0j
	for 12852 <at> debbugs.gnu.org; Sun, 11 Nov 2012 11:21:40 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAG6Zu09sr+ZY/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOIQppxgViDBw
X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="206928552"
Received: from 108-175-230-88.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net)
	([108.175.230.88])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	11 Nov 2012 11:21:19 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
	id 96B0CAE224; Sun, 11 Nov 2012 11:21:19 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Leo <sdl.web@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
Message-ID: <jwvd2zknmtr.fsf-monnier+emacs@HIDDEN>
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN> <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
	<m1mwyonner.fsf@HIDDEN>
Date: Sun, 11 Nov 2012 11:21:19 -0500
In-Reply-To: <m1mwyonner.fsf@HIDDEN> (Leo's message of "Sun, 11 Nov 2012
	23:56:44 +0800")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

>> Hmm.. I don't really understand what this is trying to do.
>> Can you explain to me what should be the end result?
> I am writing a programmed completion table for python modules which
> should work like file name completion but separated by . instead of /.
> After each completion it should tell me whether the completion is a
> package to help me decide whether to type . and get further completions.

Any reason not actually add the ".", just like file-name completion
actually adds the / ?

> So for example, twisted.inte should complete to twisted.internet with
> minibuffer message [package] to mean that twisted.internet is a package.

Right, so it's like an annotation but only displayed when you select
that particular entry.

>>> Looks like with some change to completion--done we can have this.
>>> What do you think?
>> I have the impression that you're subverting exit-function.
>> I"m not sure yet if it's a neat hack, or if there's a better way to do it,
> Probably.

Not sure which of the two you think is probable.  Maybe the "neat hack"
is the more probable one.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 11 Nov 2012 15:57:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 11 10:57:21 2012
Received: from localhost ([127.0.0.1]:33323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TXZuS-0003Id-RS
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 10:57:21 -0500
Received: from mail-pb0-f44.google.com ([209.85.160.44]:51408)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <sdl.web@HIDDEN>) id 1TXZuR-0003IW-56
	for 12852 <at> debbugs.gnu.org; Sun, 11 Nov 2012 10:57:19 -0500
Received: by mail-pb0-f44.google.com with SMTP id uo1so479470pbc.3
	for <12852 <at> debbugs.gnu.org>; Sun, 11 Nov 2012 07:56:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:references:face:date:in-reply-to:message-id
	:user-agent:mime-version:content-type;
	bh=n6kbaMgNy+ei82zcaIHW5xcBHdTWk8MVeNjZfDgTNmY=;
	b=UTx66z8C32Rt9Eawek6K1w9uWYAfmZKdPxES3NhdAdu0oRIj7yBrfLInszClcaoKyN
	gUnoaLD26TjyNz/eERmA4NyrbdTvk6IHjxq7aaGRBYVI30axhdicQw4SnMcFE5Gu1bz5
	ljD6WW8+M5z0BawEYNHa0Ww7De3g1GGt05bIhr9VFrjPYUMeGZFNcEhtZzedSlj9G/w0
	K2s/T4KW6VLJkXwdj+tIryyfHkphARwBefuYtkuo8WM245PXiN7B7GJIBCrNPb9lcPvw
	aEi2ssGmYS0tdn7aBGeg0nN398t9BOFYy/+se0M33CsIMh/FjfqBZvSHAzhvON8yKaHM
	dl0g==
Received: by 10.68.230.2 with SMTP id su2mr17721940pbc.54.1352649416027;
	Sun, 11 Nov 2012 07:56:56 -0800 (PST)
Received: from localhost ([182.48.109.8])
	by mx.google.com with ESMTPS id j8sm2745945paz.30.2012.11.11.07.56.49
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 11 Nov 2012 07:56:55 -0800 (PST)
From: Leo <sdl.web@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN> <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg
	op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA
	AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0
	b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV
	B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh
	thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC
	HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/
	xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx
	aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4
	G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc
	DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC
Date: Sun, 11 Nov 2012 23:56:44 +0800
In-Reply-To: <jwvzk2onog8.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Sun, 11 Nov 2012 10:41:33 -0500")
Message-ID: <m1mwyonner.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (OS X 10.8.2)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.7 (/)

On 2012-11-11 23:41 +0800, Stefan Monnier wrote:
> Hmm.. I don't really understand what this is trying to do.
> Can you explain to me what should be the end result?

I am writing a programmed completion table for python modules which
should work like file name completion but separated by . instead of /.

After each completion it should tell me whether the completion is a
package to help me decide whether to type . and get further completions.

So for example, twisted.inte should complete to twisted.internet with
minibuffer message [package] to mean that twisted.internet is a package.

>> Looks like with some change to completion--done we can have this.
>> What do you think?
>
> I have the impression that you're subverting exit-function.
> I"m not sure yet if it's a neat hack, or if there's a better way to do it,

Probably.

Leo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 11 Nov 2012 15:41:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 11 10:41:56 2012
Received: from localhost ([127.0.0.1]:33313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TXZfY-0002x3-7w
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 10:41:56 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:16354)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TXZfV-0002ww-Lz
	for 12852 <at> debbugs.gnu.org; Sun, 11 Nov 2012 10:41:53 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAG6Zu09sr+ZY/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOIQppxgViDBw
X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="206927418"
Received: from 108-175-230-88.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net)
	([108.175.230.88])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	11 Nov 2012 10:41:34 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
	id B27D0AE4B5; Sun, 11 Nov 2012 10:41:33 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Leo <sdl.web@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
Message-ID: <jwvzk2onog8.fsf-monnier+emacs@HIDDEN>
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
	<m2txswzlht.fsf@HIDDEN>
Date: Sun, 11 Nov 2012 10:41:33 -0500
In-Reply-To: <m2txswzlht.fsf@HIDDEN> (Leo's message of "Sun, 11 Nov 2012
	14:45:02 +0800")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

> I am finding myself writing this in order to group related code.

>   (cond
>    ((eq action 'metadata)
>     (make-local-variable 'completion-extra-properties)
>     (setq completion-extra-properties
>           (plist-put 'completion-extra-properties :exit-function
>                      (lambda (comp status)
>                        (when (cadr (assoc (car (last (split-string comp "[.]" t)))
>                                           python-module--completion-table))
>                          (minibuffer-message "package")))))

Hmm.. I don't really understand what this is trying to do.
Can you explain to me what should be the end result?

> Looks like with some change to completion--done we can have this.
> What do you think?

I have the impression that you're subverting exit-function.
I"m not sure yet if it's a neat hack, or if there's a better way to do it,


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Nov 2012 06:45:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 11 01:45:49 2012
Received: from localhost ([127.0.0.1]:60682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TXRIg-0004WF-T0
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 01:45:49 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45265)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRIc-0004W5-NZ
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 01:45:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRII-0004vk-II
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 01:45:25 -0500
Received: from lists.gnu.org ([208.118.235.17]:34410)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRII-0004vg-FG
	for submit <at> debbugs.gnu.org; Sun, 11 Nov 2012 01:45:22 -0500
Received: from eggs.gnu.org ([208.118.235.92]:39693)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRIF-0005vB-CV
	for bug-gnu-emacs@HIDDEN; Sun, 11 Nov 2012 01:45:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRIC-0004rh-95
	for bug-gnu-emacs@HIDDEN; Sun, 11 Nov 2012 01:45:19 -0500
Received: from plane.gmane.org ([80.91.229.3]:34345)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRIC-0004rV-26
	for bug-gnu-emacs@HIDDEN; Sun, 11 Nov 2012 01:45:16 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1TXRII-0006Iv-Di
	for bug-gnu-emacs@HIDDEN; Sun, 11 Nov 2012 07:45:22 +0100
Received: from 119.255.41.67 ([119.255.41.67])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs@HIDDEN>; Sun, 11 Nov 2012 07:45:22 +0100
Received: from sdl.web by 119.255.41.67 with local (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs@HIDDEN>; Sun, 11 Nov 2012 07:45:22 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Leo <sdl.web@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
Date: Sun, 11 Nov 2012 14:45:02 +0800
Lines: 55
Message-ID: <m2txswzlht.fsf@HIDDEN>
References: <m2sj8hvrva.fsf@HIDDEN> <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: 119.255.41.67
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (OS X 10.8.2)
Cancel-Lock: sha1:ybbGSJwnjqC9GNTXZogf9SnQi+w=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

On 2012-11-11 06:33 +0800, Stefan Monnier wrote:
> AFAIK, the exit-function is a global property that applies to the whole
> completion, whereas the annotation function is related to the
> all-completions output, which can vary depending on where point is
> (e.g. in file-name completion the *Completions* buffer may list files or
> envvars, so you may need two different annotation-functions).
>
> Hence the exit-function doesn't make much sense in the completion
> table's metadata.

It still seems inconsistent to me.

I am finding myself writing this in order to group related code.

  (cond
   ((eq action 'metadata)
    (make-local-variable 'completion-extra-properties)
    (setq completion-extra-properties
          (plist-put 'completion-extra-properties :exit-function
                     (lambda (comp status)
                       (when (cadr (assoc (car (last (split-string comp "[.]" t)))
                                          python-module--completion-table))
                         (minibuffer-message "package")))))
    '(metadata
      (annotation-function
       . (lambda (comp)
           (when (cadr (assoc comp python-module--completion-table))
             " <P>")))))
    .......)

Otherwise I'd have to go to completing-read, xxxxx-completion-at-point
and the like to install the exit-function on each one of them. This is
repetitive and ugly.

I was hoping I could just write

  (cond
   ((eq action 'metadata)
    '(metadata
      (annotation-function
       . (lambda (comp)
           (when (cadr (assoc comp python-module--completion-table))
             " <P>")))
      (exit-function
       . (lambda (comp status)
                       (when (cadr (assoc (car (last (split-string comp "[.]" t)))
                                          python-module--completion-table))
                         (minibuffer-message "package"))))))
    .......)


Looks like with some change to completion--done we can have this. What
do you think?

Leo





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at 12852 <at> debbugs.gnu.org:


Received: (at 12852) by debbugs.gnu.org; 10 Nov 2012 22:34:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 10 17:34:06 2012
Received: from localhost ([127.0.0.1]:60192 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TXJcs-0001uw-AR
	for submit <at> debbugs.gnu.org; Sat, 10 Nov 2012 17:34:06 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:59721)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TXJcr-0001up-34
	for 12852 <at> debbugs.gnu.org; Sat, 10 Nov 2012 17:34:05 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAG6Zu09sr+ZY/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOIQppxgViDBw
X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="206908293"
Received: from 108-175-230-88.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net)
	([108.175.230.88])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	10 Nov 2012 17:33:49 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
	id F3047AE4B5; Sat, 10 Nov 2012 17:33:48 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Leo <sdl.web@HIDDEN>
Subject: Re: bug#12852: 24.2;
	`exit-function' not supported in completion table's metadata alist
Message-ID: <jwv4nkxqegj.fsf-monnier+emacs@HIDDEN>
References: <m2sj8hvrva.fsf@HIDDEN>
Date: Sat, 10 Nov 2012 17:33:48 -0500
In-Reply-To: <m2sj8hvrva.fsf@HIDDEN> (Leo's message of "Sat, 10 Nov 2012
	15:28:41 +0800")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12852
Cc: 12852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

> It seems inconsistent that exit-function is not implemented and
> documented like annotation-function. (info "(elisp)Programmed
> Completion")

AFAIK, the exit-function is a global property that applies to the whole
completion, whereas the annotation function is related to the
all-completions output, which can vary depending on where point is
(e.g. in file-name completion the *Completions* buffer may list files or
envvars, so you may need two different annotation-functions).

Hence the exit-function doesn't make much sense in the completion
table's metadata.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Nov 2012 07:29:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 10 02:29:16 2012
Received: from localhost ([127.0.0.1]:58775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TX5VD-0004N7-QZ
	for submit <at> debbugs.gnu.org; Sat, 10 Nov 2012 02:29:15 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59442)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <sdl.web@HIDDEN>) id 1TX5VB-0004Mz-Pm
	for submit <at> debbugs.gnu.org; Sat, 10 Nov 2012 02:29:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <sdl.web@HIDDEN>) id 1TX5Ux-0006Bh-29
	for submit <at> debbugs.gnu.org; Sat, 10 Nov 2012 02:29:02 -0500
Received: from lists.gnu.org ([208.118.235.17]:47207)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sdl.web@HIDDEN>) id 1TX5Uw-0006BE-V6
	for submit <at> debbugs.gnu.org; Sat, 10 Nov 2012 02:28:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57112)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sdl.web@HIDDEN>) id 1TX5Ut-0000Wk-Pg
	for bug-gnu-emacs@HIDDEN; Sat, 10 Nov 2012 02:28:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <sdl.web@HIDDEN>) id 1TX5Uq-00066f-ND
	for bug-gnu-emacs@HIDDEN; Sat, 10 Nov 2012 02:28:55 -0500
Received: from mail-pa0-f41.google.com ([209.85.220.41]:37582)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sdl.web@HIDDEN>) id 1TX5Uq-00066Z-Go
	for bug-gnu-emacs@HIDDEN; Sat, 10 Nov 2012 02:28:52 -0500
Received: by mail-pa0-f41.google.com with SMTP id fa10so3462332pad.0
	for <bug-gnu-emacs@HIDDEN>; Fri, 09 Nov 2012 23:28:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:subject:x-debbugs-cc:date:message-id:mime-version
	:content-type; bh=JZsHdPcK/SrHyiVGdRDHQb7pJ7cB4ee27vZNgDkhHt8=;
	b=me3M+oHfE7uRUarfDHUw18BnPQP3Fi8ctZtFuSXsFc/xcilG/77CGnCF04H3vXYVTz
	cDiBolD+/woqrZ3wf3zSoTdC/AtdPlX0f4wAmqMA1FP79CUWlAazZLBixQmAi6mRXUDa
	JwA1uz4+U4iY4lutTxZ1XEpZBiOm2UywerAS2XsdF0aAmAtbyzLX7Z/JMc8Cz1j4SHTx
	9IX6DxlAoOeJmJTLsa3CbvhuhqzfTHmFUdHl4Way/qe3y51sbIRUhcZG2sgWKS4YsxD7
	0mQ54JpdPoNcMCqLbobh66XRgxpH7LntV1p3XjbaAMs2p3ZljMpe+W2tlQNWZBUeef8O
	3skA==
Received: by 10.68.209.170 with SMTP id mn10mr33980635pbc.11.1352532531780;
	Fri, 09 Nov 2012 23:28:51 -0800 (PST)
Received: from localhost ([119.255.41.67])
	by mx.google.com with ESMTPS id ni3sm578736pbc.2.2012.11.09.23.28.50
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 09 Nov 2012 23:28:51 -0800 (PST)
From: Leo <sdl.web@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.2;
	`exit-function' not supported in completion table's metadata alist
X-Debbugs-CC: Stefan Monnier <monnier@HIDDEN>
Date: Sat, 10 Nov 2012 15:28:41 +0800
Message-ID: <m2sj8hvrva.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

It seems inconsistent that exit-function is not implemented and
documented like annotation-function. (info "(elisp)Programmed
Completion")

Leo




Acknowledgement sent to Leo <sdl.web@HIDDEN>:
New bug report received and forwarded. Copy sent to monnier@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to monnier@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#12852; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.