From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: completion-cycle-threshold and a suggestion Date: Sat, 22 May 2010 02:34:43 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274492099 12518 80.91.229.12 (22 May 2010 01:34:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 May 2010 01:34:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 22 03:34:58 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OFdc8-0002On-Pz for ged-emacs-devel@m.gmane.org; Sat, 22 May 2010 03:34:58 +0200 Original-Received: from localhost ([127.0.0.1]:60498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFdc6-0008IF-3T for ged-emacs-devel@m.gmane.org; Fri, 21 May 2010 21:34:54 -0400 Original-Received: from [140.186.70.92] (port=54243 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFdc0-0008Ge-1S for emacs-devel@gnu.org; Fri, 21 May 2010 21:34:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFdby-0000oU-6W for emacs-devel@gnu.org; Fri, 21 May 2010 21:34:47 -0400 Original-Received: from ppsw-33.csi.cam.ac.uk ([131.111.8.133]:43757) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFdby-0000oG-1x for emacs-devel@gnu.org; Fri, 21 May 2010 21:34:46 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]:41338) by ppsw-33.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:587) with esmtpsa (LOGIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1OFdbv-0003gu-CM (Exim 4.70) (return-path ); Sat, 22 May 2010 02:34:43 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 21 May 2010 20:57:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/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:125029 Archived-At: On 2010-05-22 01:57 +0100, Stefan Monnier wrote: >> The current completion cycle has this issue, for example, assume there >> are two possible completions 'feature' and 'feature-old', feature-old is >> seen first. This is counter-intuitive to the behaviour without >> completion cycle. > > I don't understand. AFAIK the completion-cycle code is careful to order > the options using a heuristic based on the length of the completions > (choosing shorter ones first). > > So are you saying that in your experience, the heuristic gives bad > results, or that the heuristic somehow was not applied? Seems so. But I am not sure which is at fault. 1. Grab magit.el (http://github.com/philjackson/magit) and load it into emacs 2. C-u M-x magit-status 3. Select a 'git' repo that has two branches: feature-old feature 4. type 'b' and switch to 'feature-old' 5. Now type 'b' again and feature-old is completed first. Leo