From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [bojohan+news@dd.chalmers.se: change to try-completion behavior] Date: Mon, 05 Mar 2007 22:22:50 -0500 Message-ID: <87tzwzf439.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173151414 6348 80.91.229.12 (6 Mar 2007 03:23:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2007 03:23:34 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 06 04:23:27 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 1HOQGr-0005aW-RX for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2007 04:23:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOQGr-0000Zd-CI for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 22:23:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOQGh-0000ZQ-5K for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:23:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOQGf-0000ZA-RT for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:23:13 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HOQGe-0004j0-2j; Mon, 05 Mar 2007 22:23:12 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l263N4f4009237; Mon, 5 Mar 2007 22:23:05 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l263MrTf024958; Mon, 5 Mar 2007 22:22:53 -0500 (EST) Original-Received: from localhost (SYDNEYPACIFIC-SIX-O-SIX.MIT.EDU [18.95.7.95]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l263MoAm004112; Mon, 5 Mar 2007 22:22:52 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HOQGI-0000hO-00; Mon, 05 Mar 2007 22:22:50 -0500 In-Reply-To: (Richard Stallman's message of "Sun\, 04 Mar 2007 21\:56\:05 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.066 X-detected-kernel: Solaris 9.1 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:67398 Archived-At: > There was an old thread in gnu.emacs.help (see below) about the change > in behavior of try-completion in CVS. > > This code > > (let ((completion-ignore-case t)) > (try-completion "w" '(("W") ("Write") ("w")))) > > returns "W" in Emacs 22. In Emacs 21 is used to return "w", that is > the best match _including_ case. > > I should have said in that discussion that I think that this is a > bug/regression. Ftry_completion contains this comment: > > /* If there is more than one exact match ignoring case, and one of > them is exact including case, prefer that one. */ > > The new short-circuiting behavior means that this note is not true in > general. > > http://article.gmane.org/gmane.emacs.help/32010 The thread you cited suggested the following patch. Does it work satisfactorily? *** emacs/src/minibuf.c.~1.326.~ 2007-02-23 11:24:42.000000000 -0500 --- emacs/src/minibuf.c 2007-03-05 22:20:35.000000000 -0500 *************** *** 1483,1488 **** --- 1483,1489 ---- matchcount++; bestmatchsize = matchsize; if (matchsize <= SCHARS (string) + && !completion_ignore_case && matchcount > 1) /* No need to look any further. */ break;