[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to determine the current table (really) being used for minibuffer co

From: Drew Adams
Subject: how to determine the current table (really) being used for minibuffer completion?
Date: Fri, 25 Sep 2009 10:20:46 -0700

Since the Emacs 23 changes to minibuffer completion, there is little doc, and
there are few doc strings. It's not always obvious how to determine the current
state of evaluation.

In particular, when completion tables are tried in sequence under the covers,
how is it possible to know at some point which table is actually being tried?
For example, how to know, during file-name completion, whether the table
currently being tried is `(completion--make-envvar-table)' or

We have the global variable `minibuffer-completion-table', but that is
apparently useless in this context. That var might be bound to some function
`foo', but that doesn't mean that it is `foo' that is actually trying to perform
completion at the moment, since completion now can involve several completion
attempts using different tables (e.g. functions), successively.

For example, the table (function) `read-file-name-internal', which is the value
of `minibuffer-completion-table', is now an alias for the closure returned by

(completion-table-in-turn 'completion--embedded-envvar-table

So not only is checking `minibuffer-completion-table' against
`read-file-name-internal' useless, there is no way to know which of the two
tables (functions) tried in turn is actually being used at a given time. Unless
I'm missing something.

How about (at least) recording in some global var the table that is currently
being used/tried?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]