From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Ernst Newsgroups: gmane.emacs.devel Subject: Re: [cjm@pobox.com: Case-insensitive partial-completion bug] Date: Mon, 20 Nov 2006 09:21:03 -0500 Message-ID: <17761.47567.438869.488325@manioc.csail.mit.edu> References: <87zmavulet.fsf@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164044029 23219 80.91.229.2 (20 Nov 2006 17:33:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Nov 2006 17:33:49 +0000 (UTC) Cc: Markus Triska , eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 20 18:33:46 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmD1U-0006fy-V3 for ged-emacs-devel@m.gmane.org; Mon, 20 Nov 2006 18:33:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmD1U-0007WW-9w for ged-emacs-devel@m.gmane.org; Mon, 20 Nov 2006 12:33:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GmA1X-0005Sh-HB for emacs-devel@gnu.org; Mon, 20 Nov 2006 09:21:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GmA1W-0005RS-9P for emacs-devel@gnu.org; Mon, 20 Nov 2006 09:21:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmA1W-0005RH-34 for emacs-devel@gnu.org; Mon, 20 Nov 2006 09:21:26 -0500 Original-Received: from [128.30.2.16] (helo=rozz.csail.mit.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GmA1Q-0008E7-9f; Mon, 20 Nov 2006 09:21:20 -0500 Original-Received: from manioc.csail.mit.edu ([128.30.84.42]) by rozz.csail.mit.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1GmA1N-0001kX-2O; Mon, 20 Nov 2006 09:21:17 -0500 Original-Received: from mernst by manioc.csail.mit.edu with local (Exim 4.50) id 1GmA1M-00067Z-JY; Mon, 20 Nov 2006 09:21:16 -0500 Original-To: rms@gnu.org In-Reply-To: X-Mailman-Approved-At: Mon, 20 Nov 2006 12:33:16 -0500 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:62569 Archived-At: > 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?