From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: how to determine the current table (really) being used for minibuffer completion?
Date: Fri, 25 Sep 2009 10:20:46 -0700 [thread overview]
Message-ID: <FA5695D9503345B5977692721561042D@us.oracle.com> (raw)
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
`(completion--file-name-table)'?
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
this:
(completion-table-in-turn 'completion--embedded-envvar-table
'completion--file-name-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?
next reply other threads:[~2009-09-25 17:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 17:20 Drew Adams [this message]
2009-09-25 20:01 ` how to determine the current table (really) being used for minibuffer completion? Stefan Monnier
2009-09-25 21:22 ` Drew Adams
2009-09-26 1:53 ` Stefan Monnier
2009-09-26 14:58 ` Drew Adams
2009-09-26 21:26 ` Stefan Monnier
2009-09-27 0:02 ` Drew Adams
2009-09-27 18:24 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FA5695D9503345B5977692721561042D@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.