From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: [cjm@pobox.com: Case-insensitive partial-completion bug] Date: Fri, 02 Mar 2007 02:18:49 +0100 Message-ID: References: <87zmavulet.fsf@gmx.at> <17761.47567.438869.488325@manioc.csail.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172807188 31454 80.91.229.12 (2 Mar 2007 03:46:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Mar 2007 03:46:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 02 04:46:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HMyiq-0005iL-95 for ged-emacs-devel@m.gmane.org; Fri, 02 Mar 2007 04:46:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMyip-0003CC-Ow for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2007 22:46:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HMyie-0003C7-Si for emacs-devel@gnu.org; Thu, 01 Mar 2007 22:46:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HMyid-0003Bv-BH for emacs-devel@gnu.org; Thu, 01 Mar 2007 22:46:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMyid-0003Bs-4t for emacs-devel@gnu.org; Thu, 01 Mar 2007 22:46:07 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HMyic-0001jD-BF for emacs-devel@gnu.org; Thu, 01 Mar 2007 22:46:06 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HMwmL-0001or-UB for emacs-devel@gnu.org; Fri, 02 Mar 2007 02:42:05 +0100 Original-Received: from gamma02.me.chalmers.se ([129.16.50.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Mar 2007 02:41:49 +0100 Original-Received: from bojohan+news by gamma02.me.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Mar 2007 02:41:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 71 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: gamma02.me.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:iUOltMrVgVTqTQpdluDtce7JjRM= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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: news.gmane.org gmane.emacs.devel:67198 Archived-At: I hope the bug below will get fixed. I run into it quite frequently when reading Info: emacs -Q -f partial-completion-mode -f info-emacs-manual `g mark RET' doesn't select and exit minibuffer. On Mon, Nov 20 2006, Michael Ernst wrote: >> The complaint was: >> >> I expected it to change "foo" to "Foo", because all possible >> completions begin with "Foo". That's what it does if you don't enable >> partial-completion-mode. But with partial-completion-mode enabled, it >> stays "foo" and Emacs displays the list of possible completions. >> >> Michael Ernst wrote the patch which implemented this behavior. >> >> Michael, why is it desirable for partial-completion mode to handle >> this case differently from ordinary completion? > > Thanks for forwarding the bug report. I'm aware of this problem, and I > agree it should be fixed, but I haven't yet found time to correct it > (though it remains on my to-do list). I have noticed it once in the 6 > months I have been using the new code, and the new code corrects problems > that I noticed much more frequently. > > My notes state that the problem is near the "same char (modulo case); no > action" comment, and near > > ;; Retain capitalization of user input even if > ;; completion-ignore-case is set. > > If the list `poss' has many possibilities with different capitalization, > then we want to retain the capitalization as input by the user. However, > if they are all the same, we want to adjust the capitalization. > > Below my signature is a test case that illustrates the problem in a > reproducible way. > > -Michael Ernst > mernst@alum.mit.edu > > > > (defun completion-test-4 (initial-input &optional ignore-case) > (let ((completion-ignore-case ignore-case)) > (completing-read "Input: " > '(("getMillis" . 1) > ("getMillisToDecideToPopup" . 2) > ("getMillisToPopup" . 3) > ("getMillisecond" . 4)) > nil ; no predicate, all answers acceptable > t ; require match > initial-input > ))) > > (partial-completion-mode 1) > (setq PC-meta-flag t) > > (completion-test-4 "getmilli" t) > ;; user types: M-TAB [normal completion] > ;; result: getMillis [chooses the element that matches modulo case] > ;; user types: RET [partial completion] > ;; result: getmillis [problem: all lower-case, second RET doesn't select] > > ;; Actually, it seems like a problem that normal completion chooses the > ;; matching element immediately rather than giving a list of all > ;; possibilities. Is this a bug in normal completion?