From: "Drew Adams" <drew.adams@oracle.com>
To: <1085@emacsbugs.donarmstrong.com>, <emacs-pretest-bug@gnu.org>
Subject: bug#1085: 23.0.60; all-completions, try-completion inconsistent: Info-read-node-name-1
Date: Sat, 4 Oct 2008 16:18:12 -0700 [thread overview]
Message-ID: <00be01c92677$7951fdb0$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <00b801c92674$b294d550$0200a8c0@us.oracle.com>
> From: Drew Adams Sent: Saturday, October 04, 2008 3:58 PM
>
> emacs -Q
> C-h i
>
> M-: (try-completion "(el" 'Info-read-node-name-1)
>
> It returns "(elisp)", meaning that this is the common prefix of all
> completions of "(el". [This is reasonable, and it satisfies the
> requirement that "(el" is a prefix of "(elisp)".]
>
> M-: (all-completions "(el" 'Info-read-node-name-1)
>
> It returns ("elisp"), meaning that the only valid completion of "(el"
> is "elisp". But "elisp" does not have the common prefix "(elisp)" as
> determined by `try-completion', and "elisp" does not even have the
> input "(el" as a prefix. This is inconsistent. `all-completions'
> should return ("(elisp)") in this case.
>
> Lisp code needs to be able to depend on the fact that the valid
> completions returned by `all-completions' have the common prefix
> that is returned by `try-completion' (which must in turn have the
> input as its prefix).
>
> And each of the completions returned by `all-completions' must
> also satisfy `test-completion'. In particular,
> (test-completion STRG (all-completions strg TABLE)) must always
> return t, for all STRG and TABLE. In this case, for STRG = "(el" and
> TABLE = `Info-read-node-name-1', it returns nil.
>
> One should be able to use `all-completions' to construct a cons
> completion table that is equivalent to the original TABLE argument,
> regardless of how TABLE is defined (e.g. function, obarray). That
> is, when used with the same inputs it should have the same effect,
> in particular for `try-completion', `all-completions', and
> `test-completion'.
>
> I don't know if this is a bug for Info-read-node-name-1 (or -2) or a
> bug for one of the `minibuffer.el' functions that it uses. The code
> is a bit hard to follow.
>
>
> In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
> of 2008-10-03 on LENNART-69DE564
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --no-opt
> --cflags -Ic:/g/include
> -fno-crossjumping'
FWIW, Emacs 22 also has the same problem, albeit differently:
(try-completion "(el" 'Info-read-node-name-1) -> "(elisp"
(all-completions "(el" 'Info-read-node-name-1) -> ("elisp")
So the problem is likely not with the `minibuffer.el' code.
In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
next prev parent reply other threads:[~2008-10-04 23:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87vdkolnzb.fsf@cyd.mit.edu>
2008-10-04 22:58 ` bug#1085: 23.0.60; all-completions, try-completion inconsistent: Info-read-node-name-1 Drew Adams
2008-10-04 23:18 ` Drew Adams [this message]
2008-10-05 22:53 ` Drew Adams
2008-10-05 23:36 ` Stefan Monnier
2008-10-06 4:29 ` Drew Adams
2008-10-06 14:37 ` Stefan Monnier
2008-10-06 16:47 ` Drew Adams
2008-10-07 2:06 ` Stefan Monnier
2008-10-07 4:42 ` Drew Adams
2008-10-07 14:52 ` Stefan Monnier
2008-10-07 16:47 ` Drew Adams
2008-10-07 21:07 ` Stefan Monnier
2008-10-07 23:10 ` Drew Adams
2008-10-08 2:31 ` Stefan Monnier
2008-10-08 6:25 ` Drew Adams
2008-10-08 16:10 ` Stefan Monnier
2008-10-08 16:24 ` Drew Adams
2009-08-15 22:25 ` bug#1085: marked as done (23.0.60; all-completions, try-completion inconsistent: Info-read-node-name-1) Emacs bug Tracking System
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='00be01c92677$7951fdb0$0200a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=1085@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@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.