unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: RE: how to determine the current table (really) being used for minibuffer completion?
Date: Sat, 26 Sep 2009 07:58:17 -0700	[thread overview]
Message-ID: <D9ED6E70AA84460D84BEFDF42C22D1A5@us.oracle.com> (raw)
In-Reply-To: <jwvbpkyfq0x.fsf-monnier+emacs@gnu.org>

Hypothetical example that might make the request clearer:

(completion-all-completions
 STRING 'read-file-name-internal nil (length STRING))

The result returned might be a list of relative file names, or it might be a
list of env vars. A result such as ("CATACOMBS" "CATAPHILE" "CATASTROPHE" . 4)
could be either.

I would like (via Lisp) to know which kind of completion was in fact used
successfully: file-name completion per se or env var completion.

I don't want to analyze STRING (e.g. check for `$') to figure out what might be
the case. (completion-boundaries STRING 'read-file-name-internal nil "") just
gives something like (0 . 0), indicating the whole STRING.

Emacs should be able to tell me directly what the last completion table/function
used was. It should be easy to make this info available somehow, e.g. in a
global variable.

Similarly, for multiple, successive completion types using `completion-styles',
I would like to know which type (style) was in fact successful.

This is the kind of thing I'm talking about.





  reply	other threads:[~2009-09-26 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 17:20 how to determine the current table (really) being used for minibuffer completion? Drew Adams
2009-09-25 20:01 ` Stefan Monnier
2009-09-25 21:22   ` Drew Adams
2009-09-26  1:53     ` Stefan Monnier
2009-09-26 14:58       ` Drew Adams [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D9ED6E70AA84460D84BEFDF42C22D1A5@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).