From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: Re: 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> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: In-Reply-To: (Stefan Monnier's message of "Tue, 12 Apr 2011 00:42:43 -0300") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org To: Stefan Monnier Cc: Tassilo Horn , emacs-orgmode@gnu.org, emacs-devel@gnu.org List-Id: emacs-orgmode.gnu.org --=-=-= 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----- --=-=-=--