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#4504: 23.1; [missing feature] `minibuffer-force-completion' does not cycle through completions Date: Wed, 23 Sep 2009 22:39:06 -0400 Message-ID: References: <20090921142016.GA4717@mycomputer> Reply-To: Stefan Monnier , 4504@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253760447 15611 80.91.229.12 (24 Sep 2009 02:47:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 02:47:27 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 4504@emacsbugs.donarmstrong.com To: Bruno Barbier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 24 04:47:19 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqeMY-0002iY-Sf for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 04:47:19 +0200 Original-Received: from localhost ([127.0.0.1]:59315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqeMY-0001QP-Aq for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 22:47:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqeMS-0001PL-FK for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 22:47:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqeMO-0001Lv-55 for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 22:47:12 -0400 Original-Received: from [199.232.76.173] (port=48921 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqeMN-0001Lp-Q9 for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 22:47:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59051) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MqeMM-0008RC-Tu for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 22:47:07 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8O2l3ni014144; Wed, 23 Sep 2009 19:47:04 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8O2j9fL013846; Wed, 23 Sep 2009 19:45:09 -0700 Resent-Date: Wed, 23 Sep 2009 19:45:09 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 24 Sep 2009 02:45:09 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4504 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4504-submit@emacsbugs.donarmstrong.com id=B4504.125375995412920 (code B ref 4504); Thu, 24 Sep 2009 02:45:09 +0000 Original-Received: (at 4504) by emacsbugs.donarmstrong.com; 24 Sep 2009 02:39:14 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8O2dCqp012916 for <4504@emacsbugs.donarmstrong.com>; Wed, 23 Sep 2009 19:39:13 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar4EAN94ukpFpYEz/2dsb2JhbACBUdRqhBsFh34 X-IronPort-AV: E=Sophos;i="4.44,442,1249272000"; d="scan'208";a="46463474" Original-Received: from 69-165-129-51.dsl.teksavvy.com (HELO pastel.home) ([69.165.129.51]) by ironport2-out.pppoe.ca with ESMTP; 23 Sep 2009 22:39:06 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9B11F807A; Wed, 23 Sep 2009 22:39:06 -0400 (EDT) In-Reply-To: <20090921142016.GA4717@mycomputer> (Bruno Barbier's message of "Mon, 21 Sep 2009 16:20:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 23 Sep 2009 22:47:12 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31425 Archived-At: > The function `minibuffer-force-complete' does not cycle > through completions; it just steps through the completion list once. Indeed. > See attached patch against today CVS version ([2009-09-21 Mon]). Thank you. I've installed a simpler patch (see below) that makes use of the `last' function. > 2009-09-21 or whoever commits it Actually, this part of the changelog should list the author of the patch, not the person who committed it. Stefan Index: lisp/minibuffer.el =================================================================== RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v retrieving revision 1.83 diff -u -r1.83 minibuffer.el --- lisp/minibuffer.el 2 Sep 2009 03:09:19 -0000 1.83 +++ lisp/minibuffer.el 24 Sep 2009 02:37:30 -0000 @@ -546,7 +546,9 @@ ;; completion-all-sorted-completions to nil, but we prefer not to, ;; so that repeated calls minibuffer-force-complete still cycle ;; through the previous possible completions. - (setq completion-all-sorted-completions (cdr all))))) + (let ((last (last all))) + (setcdr last (cons (car all) (cdr last))) + (setq completion-all-sorted-completions (cdr all)))))) (defvar minibuffer-confirm-exit-commands '(minibuffer-complete minibuffer-complete-word PC-complete PC-complete-word)