From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs 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 Message-ID: <00be01c92677$7951fdb0$0200a8c0@us.oracle.com> References: <00b801c92674$b294d550$0200a8c0@us.oracle.com> Reply-To: Drew Adams , 1085@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1223163016 19032 80.91.229.12 (4 Oct 2008 23:30:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2008 23:30:16 +0000 (UTC) To: <1085@emacsbugs.donarmstrong.com>, Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 05 01:31:13 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KmGae-0005vZ-KY for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Oct 2008 01:31:12 +0200 Original-Received: from localhost ([127.0.0.1]:48095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmGZb-00038F-7I for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Oct 2008 19:30:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmGZV-00035w-KP for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2008 19:30:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmGZV-00035I-45 for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2008 19:30:01 -0400 Original-Received: from [199.232.76.173] (port=45598 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmGZU-000352-Ba for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2008 19:30:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57905) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KmGZS-0003d4-T9 for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2008 19:29:59 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m94NTu9S012192; Sat, 4 Oct 2008 16:29:56 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m94NP5ee011165; Sat, 4 Oct 2008 16:25:05 -0700 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 04 Oct 2008 23:25:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1085 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1085-submit@emacsbugs.donarmstrong.com id=B1085.12231622939766 (code B ref 1085); Sat, 04 Oct 2008 23:25:05 +0000 Original-Received: (at 1085) by emacsbugs.donarmstrong.com; 4 Oct 2008 23:18:13 +0000 Original-Received: from rgminet01.oracle.com (rgminet01.oracle.com [148.87.113.118]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m94NIAeI009760 for <1085@emacsbugs.donarmstrong.com>; Sat, 4 Oct 2008 16:18:11 -0700 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m94NI4p9023062; Sat, 4 Oct 2008 17:18:04 -0600 Original-Received: from acsmt707.oracle.com (acsmt707.oracle.com [141.146.40.85]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m94NI2SC030194; Sat, 4 Oct 2008 17:18:02 -0600 Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 04 Oct 2008 16:18:01 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <00b801c92674$b294d550$0200a8c0@us.oracle.com> Thread-Index: AckmdLI3jEaez6OqTMujV9yEDqzNRAAAj08w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 04 Oct 2008 19:30:01 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21116 gmane.emacs.pretest.bugs:23146 Archived-At: > 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)'