From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: [O] Re: Completing with anything Date: Tue, 12 Apr 2011 11:48:41 +0200 Message-ID: References: <87r5bhysp6.fsf@keller.adm.naquadah.org> <878vxovsym.fsf@keller.adm.naquadah.org> <87k4h7ua23.fsf@member.fsf.org> <87vd0romky.fsf@keller.adm.naquadah.org> <87mxm2na63.fsf@member.fsf.org> <87vd0qfhu3.fsf@member.fsf.org> <87y63jpii5.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1302601736 6186 80.91.229.12 (12 Apr 2011 09:48:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2011 09:48:56 +0000 (UTC) Cc: Tassilo Horn , emacs-orgmode@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 11:48:51 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from [140.186.70.17] (helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9aDJ-0006eK-IO for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 11:48:49 +0200 Original-Received: from localhost ([::1]:51035 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9aDJ-00077M-51 for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 05:48:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9aDG-00077A-9N for emacs-devel@gnu.org; Tue, 12 Apr 2011 05:48:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9aDF-0007c3-7s for emacs-devel@gnu.org; Tue, 12 Apr 2011 05:48:46 -0400 Original-Received: from prometheus.naquadah.org ([212.85.154.174]:60152 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9aDF-0007bf-2o; Tue, 12 Apr 2011 05:48:45 -0400 Original-Received: from cigue.easter-eggs.fr (coquelicot-a.easter-eggs.com [82.235.59.105]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id B11C15C1E9; Tue, 12 Apr 2011 11:48:42 +0200 (CEST) Mail-Followup-To: Stefan Monnier , Tassilo Horn , emacs-orgmode@gnu.org, emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Tue, 12 Apr 2011 00:42:43 -0300") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.85.154.174 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 X-Broken-Reverse-DNS: no host name found for IP address 140.186.70.17 Xref: news.gmane.org gmane.emacs.devel:138433 gmane.emacs.orgmode:40815 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Apr 12 2011, Stefan Monnier wrote: > Hmm... good point, doing it in completion-choices is not reliable, tho > using as completion table something like: > > (lambda (string pred action) > (let ((res (complete-with-action action completion-choices string pred)= )) > (if (and (eq action nil) > (assq (if (eq res t) string res) )) > (cdr (assq (if (eq res t) string res) )) > res))) > > should work OK for prefix completion, but that means using the expansion > "by hand" rather than via expand-abbrev, which may not be an option. Yeah. That does not looks like a simple/good option. As it stands, I guess the bbdb solution to return a function doing the replacement rather than trying to return a list and conform with the (current) way of doing completion is really simpler, unfortunately. :( =2D-=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJNpB/5AAoJEGEbqVCLeKXCTcgP/1U+GD7vfQOKvlZjW8h4J4IJ o44ySqu0lXMEweNW0GRi7y6uhKNorwu0VdJQ/Z13b2SHvSy7vtzVkU/ADFyN2Tsz At1IqojYYeeTOEBcgTNqaueMgxsXorIDrmM7PJcu9zcIX5hNn9QOfsESjm+l4omt xGBaAz3HrSgajzwbcGodLLbO1psvRhb43Un6f9zO0Ty1bvuievVM42urhx/qgLyk Bw/zlp+oGqjnmqGe/dE2b8FioUs3jha4l/eXyXRRMNxTgfbocr0jJIRzU+VwZ+rm P9pEjNYaN84doUcE0QdSfb3OR7WDb1jF7NLBZiKX+kEWZlKvTjfEER9hUuMmsHlR LGYchHX3qPwd1GeeDSbyYS826CQuN9xKcwcUmDp9nSSbKDREScEapwOsyyVInEGI /SRzSwwDYu0FrE87O6TOdJ+LH6E56AxN+DZ065KCOY4+N2CuT7EacupqqbwN2LnS O3G74mPi8EXBNyorbrNaP1Qa9+A33/Y0IJngMs94m52zAb0pGUoGqGiUCQrxjIaL sfP32jera13seIbuZcbyaZiaJOWhEA6OxPUh3KfcO/s13WT8xQ1TGY7tJkQ2kK/s 4k+A4qhnTO1niSIfwW56hAf7ZP1I2q4HAWtJOw6R1GuozYYetyZp/gF+BWopFF21 lfU/eBINJgYpMV/4UF39 =Sx/M -----END PGP SIGNATURE----- --=-=-=--