From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wesley Dawson Newsgroups: gmane.emacs.bugs Subject: bug#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored Date: Tue, 18 Dec 2012 21:41:13 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1355904370 23654 80.91.229.3 (19 Dec 2012 08:06:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2012 08:06:10 +0000 (UTC) To: 13224@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 19 09:06:25 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 1TlEfY-0007Kp-NH for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Dec 2012 09:06:24 +0100 Original-Received: from localhost ([::1]:59910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlEfL-0000cn-6E for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Dec 2012 03:06:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlEfF-0000bo-Rd for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 03:06:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlEfC-0004HE-Fs for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 03:06:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlEfC-0004H0-C8 for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 03:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TlEfC-0003dz-CH for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 03:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wesley Dawson Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Dec 2012 08:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13224 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135590430713938 (code B ref -1); Wed, 19 Dec 2012 08:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2012 08:05:07 +0000 Original-Received: from localhost ([127.0.0.1]:49891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlEeI-0003ck-FA for submit@debbugs.gnu.org; Wed, 19 Dec 2012 03:05:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43752) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlCQJ-0000HS-46 for submit@debbugs.gnu.org; Wed, 19 Dec 2012 00:42:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlCQG-0005vH-70 for submit@debbugs.gnu.org; Wed, 19 Dec 2012 00:42:30 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:47577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlCQG-0005vD-3l for submit@debbugs.gnu.org; Wed, 19 Dec 2012 00:42:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlCQD-0000AY-D5 for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 00:42:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlCQA-0005ut-Ve for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 00:42:25 -0500 Original-Received: from karen.lavabit.com ([72.249.41.33]:35188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlCQA-0005up-Pg for bug-gnu-emacs@gnu.org; Wed, 19 Dec 2012 00:42:22 -0500 Original-Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id A348A11BBAA for ; Tue, 18 Dec 2012 23:42:21 -0600 (CST) Original-Received: from sirith (c-24-130-13-84.hsd1.ca.comcast.net [24.130.13.84]) by lavabit.com with ESMTP id X3L5CB95MHXU for ; Tue, 18 Dec 2012 23:42:21 -0600 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=UGyMbq74YzmUK7SS2YpPJTnTiNzNhU2942S1vknuMBjKZ4m/rBZrIyes4EFN5K8WJ8fpdfr5DiRbkKwNgqRpcsQrxzJdD7f/xfkvnsDKj8JDTm+BXdjbuCY5O8ZSQUSRtSw7aNLP+eozzAdqzmtJtvLqp1Pn+24jZob780GXcj4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Wed, 19 Dec 2012 03:05:04 -0500 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.x 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:68724 Archived-At: --=-=-= Content-Type: text/plain M-x icomplete-mode M-x set-variable icomplete-prospects-height 1 M-x a (the candidates list takes up two lines in the minibuffer) Here's a patch to make icomplete honor `icomplete-prospects-height' again, which it hasn't since the introduction of `icomplete-separator' (revno: 111031). About formatting: the source appears to mix tabs and spaces for indentation quite freely; I didn't attempt to fix this and went with what emacs -Q did for formatting. * lisp/icomplete.el (icomplete-completions): Fix to honor `icomplete-prospects-height' again. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=patch.diff Content-Transfer-Encoding: quoted-printable Content-Description: Fix to honor `icomplete-prospects-height' again. =3D=3D=3D modified file 'lisp/icomplete.el' --- lisp/icomplete.el 2012-12-17 19:43:55 +0000 +++ lisp/icomplete.el 2012-12-19 04:25:35 +0000 @@ -343,8 +343,10 @@ (t (concat "=E2=80=A6" (substring most compare)))) close-bracket))) ;;"-prospects" - more than one candidate - (prospects-len (+ (length determ) 6 ;; take {,...} into account - (string-width (buffer-string)))) + (prospects-len (+ (length determ) + (string-width icomplete-separator) + 3 ;; take {=E2=80=A6} into account + (string-width (buffer-string)))) (prospects-max ;; Max total length to use, including the minibuffer content. (* (+ icomplete-prospects-height @@ -375,7 +377,9 @@ (cond ((string-equal comp "") (setq most-is-exact t)) ((member comp prospects)) (t (setq prospects-len - (+ (string-width comp) 1 prospects-len)) + (+ (string-width comp) + (string-width icomplete-separator) + prospects-len)) (if (< prospects-len prospects-max) (push comp prospects) (setq limit t)))))) --=-=-=--