From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Monnier Subject: Re: Re: Completing with anything Date: Tue, 12 Apr 2011 00:42:43 -0300 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: text/plain Return-path: In-Reply-To: (Julien Danjou's message of "Mon, 11 Apr 2011 11:21:14 +0200") 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: Tassilo Horn Cc: emacs-orgmode@gnu.org, emacs-devel@gnu.org List-Id: emacs-orgmode.gnu.org > Because this one return (list start end completion-choies), and does not > do anything else. I can't do it myself using the current completion > mechanism, IIUC. 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. Stefan