From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fran Litterio Newsgroups: gmane.emacs.bugs Subject: bug#7266: Patch to fix minibuffer-complete when icomplete-mode is on and completion-cycle-threshold is nil Date: Fri, 22 Oct 2010 11:03:44 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1287764068 25613 80.91.229.12 (22 Oct 2010 16:14:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Oct 2010 16:14:28 +0000 (UTC) To: 7266@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 22 18:14:27 2010 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.69) (envelope-from ) id 1P9KFg-0006K5-Lg for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Oct 2010 18:14:27 +0200 Original-Received: from localhost ([127.0.0.1]:50677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9KFW-0005Cj-Ua for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Oct 2010 12:13:47 -0400 Original-Received: from [140.186.70.92] (port=33720 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9KEu-0004r4-PU for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2010 12:13:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9KEj-0000tG-F0 for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2010 12:12:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P9KEj-0000tA-D8 for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2010 12:12:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P9K3C-0004dK-83; Fri, 22 Oct 2010 12:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Fran Litterio Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Oct 2010 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7266 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128776325317801 (code B ref -1); Fri, 22 Oct 2010 16:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Oct 2010 16:00:53 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P9K31-0004d3-Vw for submit@debbugs.gnu.org; Fri, 22 Oct 2010 12:00:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P9JHc-0003a7-Lj for submit@debbugs.gnu.org; Fri, 22 Oct 2010 11:11:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9JLN-0004Hn-JR for submit@debbugs.gnu.org; Fri, 22 Oct 2010 11:15:46 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:38608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P9JLM-0004HB-Hs for submit@debbugs.gnu.org; Fri, 22 Oct 2010 11:15:45 -0400 Original-Received: from [140.186.70.92] (port=38026 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9JLH-0003dd-Jy for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2010 11:15:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9JA7-0001yp-2T for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2010 11:04:08 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:48533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P9JA6-0001yc-Uj for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2010 11:04:07 -0400 Original-Received: by wwb34 with SMTP id 34so1064366wwb.30 for ; Fri, 22 Oct 2010 08:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=YtFbkUU58+AKkyUmDMJpenV7Co2yHYwYbOZKgSuL0ww=; b=lWPckWE9+0dLYtdbd7IbnhmXD41y0Cf9dWKZEbRW8nt2cNF7anbcupxoMxMvaYPylO kM2kAKrHGgTUK8JsxNctXXdG/FF6tFYTRWEss1UyiuOXKhJSgEibhqu6MtpmVEBl6luL +waip27nBEmeMZrozU7IXU6o6gHqD1ksVfdb4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=sBAbLjO5p3wD/lQV1HNIa1US3Aex2WncNWOaR6JlgIpi495TVn5GlLg60mafJIxteY V4P646IsCKax9Ju//KreamfM9MbfK3MEWr9r6R4ryLvRg2ureoHm/jdzzD1xliBi9ZC2 o5+nYt3kdI2/dAn6ubF0ceiHtPOoDfcIFaVtU= Original-Received: by 10.227.134.206 with SMTP id k14mr2958230wbt.121.1287759845502; Fri, 22 Oct 2010 08:04:05 -0700 (PDT) Original-Received: by 10.216.133.99 with HTTP; Fri, 22 Oct 2010 08:03:44 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 22 Oct 2010 12:00:51 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 22 Oct 2010 12:01:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , 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:41068 Archived-At: To reproduce the bug do this: 1. Launch "emacs -q". 2. Type: ESC ESC : (icomplete-mode 1) RET C-h v mini TAB TAB Notice that minibuffer-complete (which is bound to TAB at this point) is cycling through the completion choices instead of popping up a window to display the completion choices. This bug is caused code in lisp/minibuffer.el that does not check that the value of completion-cycle-threshold is not nil before deciding to cycle completions. This patch (to the Bazaar sources) fixes the bug: --- lisp/minibuffer.el.orig 2010-10-21 17:55:46.380857900 -0400 +++ lisp/minibuffer.el 2010-10-22 10:29:29.188417500 -0400 @@ -607,7 +607,8 @@ (completion-all-sorted-completions)))) (setq completion-all-sorted-completions nil) (cond - ((and (not (ignore-errors + ((and completion-cycle-threshold ;; Never cycle if completion-cycle-threshold is nil. + (not (ignore-errors ;; This signal an (intended) error if comps is too ;; short or if completion-cycle-threshold is t. (consp (nthcdr completion-cycle-threshold comps)))) @@ -664,7 +665,8 @@ (scroll-other-window)) nil))) ;; If we're cycling, keep on cycling. - (completion-all-sorted-completions + ((and completion-cycle-threshold ;; Never cycle if completion-cycle-threshold is nil. + completion-all-sorted-completions) (minibuffer-force-complete) t) (t (case (completion--do-completion)