[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Completing with anything
From: |
Julien Danjou |
Subject: |
Re: [O] Completing with anything |
Date: |
Tue, 12 Apr 2011 11:48:41 +0200 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) |
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) <expansion-alist>))
> (cdr (assq (if (eq res t) string res) <expansion-alist>))
> 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. :(
--
Julien Danjou
❱ http://julien.danjou.info
pgplPTEtzzcAK.pgp
Description: PGP signature