GNU bug report logs - #4504
23.1; [missing feature] `minibuffer-force-completion' does not cycle through completions

Previous Next

Package: emacs;

Reported by: Bruno Barbier <bruno.barbier.cs <at> orange.fr>

Date: Mon, 21 Sep 2009 14:50:04 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Bruno Barbier <bruno.barbier.cs <at> orange.fr>
Cc: 4504 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: bug#4504: 23.1; [missing feature] `minibuffer-force-completion' does not cycle through completions
Date: Wed, 23 Sep 2009 22:39:06 -0400
> 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    <bruno.barbier.cs <at> orange.fr> 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)




This bug report was last modified 15 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.