From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Markus Rost Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: completing-read case problem Date: Mon, 15 Nov 2004 14:43:34 -0500 Message-ID: <200411151943.iAFJhYL6009036@haifa.math.ias.edu> References: <200411101929.iAAJThfq007309@haifa.math.ias.edu> <200411140703.iAE73Gd1019094@haifa.math.ias.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100547841 3185 80.91.229.6 (15 Nov 2004 19:44:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2004 19:44:01 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 15 20:43:55 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTmlX-0000WA-00 for ; Mon, 15 Nov 2004 20:43:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTmuF-0004KF-BD for ged-emacs-devel@m.gmane.org; Mon, 15 Nov 2004 14:52:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTmu3-0004Is-Rv for emacs-devel@gnu.org; Mon, 15 Nov 2004 14:52:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTmu1-0004I8-F6 for emacs-devel@gnu.org; Mon, 15 Nov 2004 14:52:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTmu1-0004I4-AZ; Mon, 15 Nov 2004 14:52:41 -0500 Original-Received: from [192.16.204.67] (helo=smtp1.ias.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTmlE-0002lP-Hk; Mon, 15 Nov 2004 14:43:36 -0500 X-IAS: Institute for Advanced Study Original-Received: from yttrium.net.ias.edu (yttrium.net.ias.edu [172.16.12.11]) by smtp1.ias.edu (www.sendmail.org/2003) with SMTP id iAFJhYvr021763; Mon, 15 Nov 2004 14:43:35 -0500 (EST) Original-Received: from mailhost.math.ias.edu ([172.16.41.5]) by yttrium.net.ias.edu (NAVGW 2.5.2.9) with SMTP id M2004111514433424871 ; Mon, 15 Nov 2004 14:43:34 -0500 Original-Received: from haifa.math.ias.edu (haifa.math.ias.edu [172.16.41.42]) by mailhost.math.ias.edu (8.12.10/8.12.10) with ESMTP id iAFJhNqS010888; Mon, 15 Nov 2004 14:43:23 -0500 Original-Received: from haifa.math.ias.edu (localhost.localdomain [127.0.0.1]) by haifa.math.ias.edu (8.12.8/8.12.8) with ESMTP id iAFJhYLl009040; Mon, 15 Nov 2004 14:43:34 -0500 Original-Received: (from rost@localhost) by haifa.math.ias.edu (8.12.8/8.12.8/Submit) id iAFJhYL6009036; Mon, 15 Nov 2004 14:43:34 -0500 Original-To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Mon, 15 Nov 2004 10:38:54 -0500) X-Mailer: GNU Emacs 21.3+ X-Home-Page: http://www.mathematik.uni-bielefeld.de/~rost X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29884 gmane.emacs.pretest.bugs:4682 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29884 [I suggest to keep this thread on emacs-devel.] > > (let ((completion-ignore-case t)) > > (completing-read "Give me ABC: " > > (list "abc") > > (lambda (string) > > (string= string "abc")) > > t > > )) > > > With input "ABC" it returns "ABC", which I think is incorrect -- at > > least it may lead to surprises in programs which assume that the > > output of completing-read is always an exact member of TABLE, > > restricted by PREDICATE. > > Yes, we pretty much agreed to that in an earlier discussion this year. > Nobody has stepped forward with a patch for it, tho. > I guess you mean the discussion started with . I think it would be definitely better to fix completing-read than to make changes elsewhere in code using completing-read, but I can't do that (I am not a C programmer). The mentioned problem with "M-x customize-group Mouse" is rather minor, and one could just leave it as it is. One possibility for a change would be the patch below, but I don't like it, and it would have to be applied also to customize-group-other-window and perhaps also at other places in cus-edit.el. ===Buffer *vc-diff*========================================= *** cus-edit.el 02 Nov 2004 09:17:44 -0500 1.196 --- cus-edit.el 15 Nov 2004 14:32:55 -0500 *************** *** 866,871 **** --- 866,875 ---- (or (get symbol 'custom-loads) (get symbol 'custom-group))) t)))) + ;; If we got the wrong case, give it another try. + (unless (or (get (intern group) 'custom-loads) + (get (intern group) 'custom-group)) + (setq group (downcase group))) (when (stringp group) (if (string-equal "" group) (setq group 'emacs) ============================================================