GNU bug report logs - #13224
24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored

Previous Next

Package: emacs;

Reported by: Wesley Dawson <whd <at> lavabit.com>

Date: Wed, 19 Dec 2012 08:06:02 UTC

Severity: normal

Tags: patch

Found in version 24.3.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Wesley Dawson <whd <at> lavabit.com>
Subject: bug#13224: closed (Re: bug#13224: 24.3.50; [PATCH] Variable
 `icomplete-prospects-height' is no longer honored)
Date: Fri, 04 Jan 2013 08:22:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 13224 <at> debbugs.gnu.org.

-- 
13224: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13224
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 13224-done <at> debbugs.gnu.org
Subject: Re: bug#13224: 24.3.50;
	[PATCH] Variable `icomplete-prospects-height' is no longer honored
Date: Fri, 04 Jan 2013 03:21:26 -0500
Thanks; applied.

[Message part 3 (message/rfc822, inline)]
From: Wesley Dawson <whd <at> lavabit.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
	[PATCH] Variable `icomplete-prospects-height' is no longer honored
Date: Tue, 18 Dec 2012 21:41:13 -0800
[Message part 4 (text/plain, inline)]

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.

[patch.diff (text/x-patch, inline)]
=== 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 "…" (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 {…} 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))))))


This bug report was last modified 12 years and 197 days ago.

Previous Next


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