From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [bojohan+news@dd.chalmers.se: change to try-completion behavior] Date: Sun, 04 Mar 2007 21:56:05 -0500 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1173063836 18201 80.91.229.12 (5 Mar 2007 03:03:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2007 03:03:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 05 04:03:49 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 1HO3UJ-0002Aa-K0 for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 04:03:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HO3UJ-0000Oj-8I for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2007 22:03:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HO3OY-0005D8-3X for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HO3OW-0005CJ-Fh for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HO3OW-0005Bq-5m for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:48 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HO3OV-0001aN-Fb for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:47 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HO3Mr-0002o7-Ig; Sun, 04 Mar 2007 21:56:05 -0500 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:67342 Archived-At: Would someone please try to debug this? Please ack if you have worked on this. ------- Start of forwarded message ------- Mail-Followup-To: emacs-devel@gnu.org To: emacs-devel@gnu.org From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Date: Thu, 22 Feb 2007 19:33:08 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Mail-Copies-To: never Subject: change to try-completion behavior X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.4 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 From: Johan Bockgård dd.chalmers.se> Subject: Re: change to try-completion behavior in 21.3? Newsgroups: gmane.emacs.help Date: 2005-12-17 06:49:54 GMT Stefan Monnier iro.umontreal.ca> writes: >> Why should it ever return the capital letter W? > > Because in your completion table, you have "W". "w" was also in the table. This change revision 1.237 date: 2002-04-09 19:28:42 +0000; author: monnier; state: Exp; lines: +89 -47 [...] (Ftry_completion): Allow lambda forms and lists of strings for `alist'. Short-circuit the search as soon as it "failed". [...] added this piece of code (approximately) if (matchsize <= SCHARS (string) && matchcount > 1) /* No need to look any further. */ break; When completion-ignore-case is t this doesn't necessarily find the best match _including case_ (AFAICS). - -- Johan Bockgård _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------- End of forwarded message -------