From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: completion-all-completions-with-base-size
Date: Sat, 18 Oct 2008 22:08:58 +0200 [thread overview]
Message-ID: <uej2dll7p.fsf@gnu.org> (raw)
In-Reply-To: <jwvprlxoggq.fsf-monnier+emacs@gnu.org>
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 18 Oct 2008 15:31:18 -0400
>
> > This NEWS entry:
> > *** `all-completions' may now return the base size in the last cdr.
> > Since this means the returned list is not properly nil-terminated, this
> > is an incompatible change and is thus enabled by the new variable
> > completion-all-completions-with-base-size.
>
> > is inaccurate: `all-completions' does not take into account the value
> > of `completion-all-completions-with-base-size'.
>
> IIUC, this is not relevant:
Sorry, I'm not following: what isn't relevant, and to what?
> the base-size is always 0 (in which case
> it's not necessary to add it) for all completion tables except
> functional ones. So of course all-completions doesn't take it into
> account: only the functional completion tables do.
>
> Still, the value returned by all-completions can contains such `cdr's
> and it depends on completion-all-completions-with-base-size.
>
> > Only `completion-all-completions' and a couple of internal functions
> > consult that variable.
>
> `completion-all-completions' does not consult it: it sets it.
Now you lost me completely. Could you please describe one scenario
and the corresponding sequence of function calls which would cause
all-completions (either what it does or the values it returns) to
depend on completion-all-completions-with-base-size?
> > But `completion-all-completions' is not documented in the ELisp
> > manual, as are most of other APIs in minibuffer.el (should they be
> > documented?),
>
> I don't see why they should be documented there. The entry points are
> the same as before (and are documented): minibuffer-complete,
> minibuffer-complete-word, ...
Yes, but all-completions _is_ described, as are try-completion and
test-completion. The ELisp manual describes not only high-level entry
points, but also the low-level primitives, where that may help a Lisp
programmer to write yet another higher-level completion function.
> > so it sounds like the above NEWS entry does not warrant any
> > documentation in the manuals? Why then it was added to NEWS?
>
> Because some functions may call all-completions in a context where
> someone has set completion-all-completions-with-base-size
> (e.g. when all-completions is used internally by a functional
> completion table), in which case it may be surprised by the extra `cdr'
> (which could cause `length' or `mapcar' to signal an error).
Well, I'm probably missing something, because I couldn't see how what
all-completions returns could depend on
completion-all-completions-with-base-size. Please help me understand
that.
Thanks.
next prev parent reply other threads:[~2008-10-18 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-18 13:03 completion-all-completions-with-base-size Eli Zaretskii
2008-10-18 19:31 ` completion-all-completions-with-base-size Stefan Monnier
2008-10-18 20:08 ` Eli Zaretskii [this message]
2008-10-18 21:55 ` completion-all-completions-with-base-size Stefan Monnier
2008-10-18 22:07 ` completion-all-completions-with-base-size Eli Zaretskii
2008-10-19 1:59 ` completion-all-completions-with-base-size Stefan Monnier
2008-10-19 7:14 ` completion-all-completions-with-base-size Eli Zaretskii
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=uej2dll7p.fsf@gnu.org \
--to=eliz@gnu.org \
--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 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.