From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#26939: 25.2; emacs --daemon, incorrect icomplete-prospects-height Date: Mon, 05 Jun 2017 19:19:47 -0400 Message-ID: <87r2yyxbsc.fsf@users.sourceforge.net> References: <86o9uuz2ob.fsf@m8000.fhaun.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1496704757 9180 195.159.176.226 (5 Jun 2017 23:19:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2017 23:19:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 26939@debbugs.gnu.org To: Frank Haun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 06 01:19:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dI1HE-00024A-S9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jun 2017 01:19:13 +0200 Original-Received: from localhost ([::1]:35508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI1HK-0000Bn-81 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jun 2017 19:19:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI1H8-0000A4-Pj for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 19:19:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dI1H4-0003NI-Qg for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 19:19:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55592) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dI1H4-0003NE-Mq for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 19:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dI1H4-0001zW-EE for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 19:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jun 2017 23:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26939-submit@debbugs.gnu.org id=B26939.14967046987601 (code B ref 26939); Mon, 05 Jun 2017 23:19:02 +0000 Original-Received: (at 26939) by debbugs.gnu.org; 5 Jun 2017 23:18:18 +0000 Original-Received: from localhost ([127.0.0.1]:58269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dI1GL-0001yS-TK for submit@debbugs.gnu.org; Mon, 05 Jun 2017 19:18:18 -0400 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:34073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dI1GK-0001y7-4m; Mon, 05 Jun 2017 19:18:16 -0400 Original-Received: by mail-it0-f67.google.com with SMTP id d68so24716337ita.1; Mon, 05 Jun 2017 16:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6OAVrflsMRfg5NqPMw/ABYfrtGJ4tAvMwV0Fo227zHQ=; b=FdIFzpyz0v0KdcMTut+NjR+4pfldPgNZlmToP0pNOAz1w0gjx9mE3s4NwI8b5YEWx9 cujTiR0MwHUsB+T5o7WTGsZDxxhHQem8umI22jzOAWxLGecbq4s0NGWIFb/DGf4NKyvM iGyWw/Unonpp1wpTktahcfmy0JB3AOhJ0SdgEgl71EHiZPtYMC8H/+uinFHZFRq0MIp2 kH6nEUcCrZxbmrwwemDBFlIjc8mKEixd4bD5ska94cxpcqoxcfqo8ijWhd76WvUqf5MV wrPrKc/hGZjJMiD14pqJ9M8pBXvLq1zsf361Y6Y/XF+w5Gx+7TvYLxMFAWJmeXB5r2Rk sWXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=6OAVrflsMRfg5NqPMw/ABYfrtGJ4tAvMwV0Fo227zHQ=; b=VvrPREPahUDCQ07Tj644SA/k/FzH45cesJXKPbYPH8d/XGn/JxqKK4U3J3LEq3RaFV fSpCphpNPwIpFQoRnUgpIsxmh/EjH9q0wsTJICBFF+3SmHZu2oIx2CpHj3rzj3Wb04oH 60Qm01K1iR6dDDLs4y+In/Hj97K7r+YYKcw7zuGM7ESEnzIFaTBisXQgZM/LQGx4gNxT dML5s3hQH4cZu6Wx5xeYXJr9nNeQOecHrenAPaKhUEdDwxpm+A++CrDnukLe+Ju1YCfR 1mIGQpcbqFKHIWyABUWMV1tIAL+nEolz9zIobFDEkJfbGmip+IkN6fGF0JtF0SksBFIG zaBQ== X-Gm-Message-State: AODbwcA6lR9DFWQgsS7Kl8FRc4DIY9zPPIveZkTczYQfq0bjLKmnkDU/ pgRI2H3mM6cDWNh+ X-Received: by 10.36.54.195 with SMTP id l186mr8389798itl.55.1496704690451; Mon, 05 Jun 2017 16:18:10 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id y40sm7908661ita.2.2017.06.05.16.18.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Jun 2017 16:18:09 -0700 (PDT) In-Reply-To: <86o9uuz2ob.fsf@m8000.fhaun.de> (Frank Haun's message of "Mon, 15 May 2017 15:10:12 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:133330 Archived-At: --=-=-= Content-Type: text/plain tags 26939 patch quit Frank Haun writes: > There is a wrong calculation of `icomplete-prospects-height` when Emacs > starts as daemon and icomplete is enabled via the init file. > > Emacs daemon returns 10 for `window-width` and > `icomplete-prospects-height` becomes 11. This is a bit similar to #27210, window sizes are unreliable in daemon mode. I think putting (window-width) as the standard value doesn't make sense anyway. The code that uses this variable already add the window-width: ;; Max total length to use, including the minibuffer content. (* (+ icomplete-prospects-height ;; If the minibuffer content already uses up more than ;; one line, increase the allowable space accordingly. (/ prospects-len (window-width))) (window-width)) So I think we should just change the standard value to 2 (which would currently be the default for window-width of 80). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-lisp-icomplete.el-icomplete-prospects-height-Defa.patch Content-Description: patch >From ca5812c7f5fd222db48aa7f43986ae6240e3640a Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Mon, 5 Jun 2017 19:18:14 -0400 Subject: [PATCH v1] * lisp/icomplete.el (icomplete-prospects-height): Default to 2 (Bug#26939). --- lisp/icomplete.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/icomplete.el b/lisp/icomplete.el index cd352de65b..00f8ed18a1 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -91,13 +91,10 @@ (defface icomplete-first-match '((t :weight bold)) :version "24.4") ;;;_* User Customization variables -(defcustom icomplete-prospects-height - ;; 20 is an estimated common size for the prompt + minibuffer content, to - ;; try to guess the number of lines used up by icomplete-prospects-length. - (+ 1 (/ (+ icomplete-prospects-length 20) (window-width))) +(defcustom icomplete-prospects-height 2 "Maximum number of lines to use in the minibuffer." :type 'integer - :version "23.1") + :version "26.1") (defcustom icomplete-compute-delay .3 "Completions-computation stall, used only with large-number completions. -- 2.11.1 --=-=-=--