From: Ulrich Mueller <ulm@gentoo.org>
To: emacs-devel@gnu.org
Subject: completing-read, incomplete documentation for "programmed completion"
Date: Mon, 5 Jan 2009 01:59:07 +0100 [thread overview]
Message-ID: <18785.23387.13834.555133@a1ihome1.kph.uni-mainz.de> (raw)
Hi,
I think that the documentation of `completing-read' should be
improved, with respect to "programmed completion". Currently, its
docstring says about the subject:
,----
| COLLECTION can also be a function to do the completion itself.
| PREDICATE limits completion to a subset of COLLECTION.
| See `try-completion' and `all-completions' for more details
| on completion, COLLECTION, and PREDICATE.
`----
Now the docstrings of `try-completion' and `all-completions' (and
`test-completion', which is not mentioned for some reason) just say
that `nil', `t', or `lambda' will be passed as the third argument to
the completion function, respectively.
However, if I evaluate the following expression:
(completing-read "Prompt: " 'debug)
and type TAB in the minibuffer, the debugger shows that neither `nil'
nor `t' nor `lambda' are passed, but that the third argument is
`(boundaries . "")'.
The debugger also shows that it is called by `completion-boundaries',
but the docstring of this function (which didn't exist in Emacs 22?)
is not helpful at all.
Am I missing something? IMHO, `completing-read' should explain its
COLLECTION argument, and should also explain what are the possible
arguments passed to the completion function.
(BTW, also the Elisp Reference Manual mentions only `nil', `t', and
`lambda' in section 20.6.6, "Programmed Completion".)
Ulrich
next reply other threads:[~2009-01-05 0:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 0:59 Ulrich Mueller [this message]
2009-01-05 2:18 ` completing-read, incomplete documentation for "programmed completion" Stefan Monnier
2009-01-05 9:17 ` Ulrich Mueller
2009-01-05 22:13 ` 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=18785.23387.13834.555133@a1ihome1.kph.uni-mainz.de \
--to=ulm@gentoo.org \
--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.