From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10963: 24.0.94; `dabbrev-completion' and `completion-cycle-threshold' Date: Mon, 12 Mar 2012 12:00:58 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1331568137 2184 80.91.229.3 (12 Mar 2012 16:02:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2012 16:02:17 +0000 (UTC) Cc: 10963@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 12 17:02:16 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S77hN-000835-BF for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2012 17:02:13 +0100 Original-Received: from localhost ([::1]:59859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S77hK-0006l0-0u for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Mar 2012 12:02:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S77h3-0006eR-8t for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:02:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S77gQ-000144-5z for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:01:48 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S77gQ-00012m-3A for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:01:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S789F-00041R-I4 for bug-gnu-emacs@gnu.org; Mon, 12 Mar 2012 12:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Mar 2012 16:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10963-submit@debbugs.gnu.org id=B10963.133156985515448 (code B ref 10963); Mon, 12 Mar 2012 16:31:01 +0000 Original-Received: (at 10963) by debbugs.gnu.org; 12 Mar 2012 16:30:55 +0000 Original-Received: from localhost ([127.0.0.1]:47023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S7898-000416-49 for submit@debbugs.gnu.org; Mon, 12 Mar 2012 12:30:54 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:54473) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S7895-00040x-5l for 10963@debbugs.gnu.org; Mon, 12 Mar 2012 12:30:52 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q2CG0wxA027683; Mon, 12 Mar 2012 12:00:59 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C06ABB402D; Mon, 12 Mar 2012 12:00:58 -0400 (EDT) In-Reply-To: (Dani Moncayo's message of "Mon, 12 Mar 2012 14:41:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4159=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4159> : streams <737160> : uri <1081730> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57722 Archived-At: > It mostly works, but there is one detail that seems to need a fix: > Consider this scenario: > 1. M-: (setq completion-cycle-threshold 4) RET > 2. foo1 RET foo2 RET foo3 RET foo > Now, repeated `C-M-/' commands cycle like this: > foo3/foo1/foo2 > but repeated `M-/' commands cycle like this: > foo3/foo2/foo1 > I think that the cycling order should be equal in both cases, and IMO > the right order is the one followed by `M-/' (ISTR that I've read > something about this in the manual, but right now I can't find the > place). That will require more changes: the current cycling order of C-M-/ is completely different from the one of M-/ because the completion table used is an obarray (a sort of hash-table), so dabbrev's ordering is completely lost, and after that the completion code uses its default sorting (which gives preference to shorter completions, which in this case makes no difference). So we'll need to stop using an obarray, and to pass an ad-hoc sorting function to the completion code. Stefan