[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to determine the current table (really) being used for minibuffe
From: |
Stefan Monnier |
Subject: |
Re: how to determine the current table (really) being used for minibuffer completion? |
Date: |
Fri, 25 Sep 2009 16:01:19 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> 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.
I do not know what you mean. Please give a concrete example showing how
you used to do it in Emacs-22.
> 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?
If you mean uses of completion-table-in-turn: you can't and neither
could you in Emacs-22; and this is not strictly a change in the
minibuffer completion but in the implementation of some completion
tables (yes, I made changes to both because the minibuffer completion
changes needed some adjustments in the competion tables to work better,
and because I wanted to rewrite in Lisp the C implementation of some of
the completion tables, and because I wanted to give the code more
structure).
> For example, how to know, during file-name completion, whether the table
> currently being tried is `(completion--make-envvar-table)' or
> `(completion--file-name-table)'?
You can't (and neither could you before, AFAICT).
Could you give us some context to beter understand when you need it?
> 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.
It does mean that `foo' is the table that does the completion.
That table may be decomposed into several distinct cases, but that's
nothing new. The same was already the case when completing for
Info-goto-node, for example.
> So not only is checking `minibuffer-completion-table' against
> `read-file-name-internal' useless,
Comparing functions is usually a bad idea. Sometimes, there's not much
else we can do, admittedly.
> How about (at least) recording in some global var the table that is
> currently being used/tried?
It's not even clear what that would mean.
Stefan
- how to determine the current table (really) being used for minibuffer completion?, Drew Adams, 2009/09/25
- Re: how to determine the current table (really) being used for minibuffer completion?,
Stefan Monnier <=
- RE: how to determine the current table (really) being used for minibuffer completion?, Drew Adams, 2009/09/25
- Re: how to determine the current table (really) being used for minibuffer completion?, Stefan Monnier, 2009/09/25
- RE: how to determine the current table (really) being used for minibuffer completion?, Drew Adams, 2009/09/26
- Re: how to determine the current table (really) being used for minibuffer completion?, Stefan Monnier, 2009/09/26
- RE: how to determine the current table (really) being used for minibuffer completion?, Drew Adams, 2009/09/26
- Re: how to determine the current table (really) being used for minibuffer completion?, Stefan Monnier, 2009/09/27