From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: [PATCH] icomplete-vertical Date: Mon, 05 Apr 2021 22:23:16 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="X1UB8GRL4Z" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32764"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 06 00:25:03 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTXeZ-0008NF-NW for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Apr 2021 00:25:03 +0200 Original-Received: from localhost ([::1]:34858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTXeY-0005ZS-L2 for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Apr 2021 18:25:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTXcz-000563-5j for emacs-devel@gnu.org; Mon, 05 Apr 2021 18:23:25 -0400 Original-Received: from heytings.org ([95.142.160.155]:58336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTXcv-0007UN-LG for emacs-devel@gnu.org; Mon, 05 Apr 2021 18:23:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1617661397; bh=BiFNKMUt8bw18Em7ouvzwNW7een6YylB2YdHU1nyIEs=; h=Date:From:To:Subject:Message-ID:From; b=tv0qOzG3SUAuS0HmdYo+zPLEjJszVRLPpUl7mNMBTiPEVCBiiRtdhiRNfVSbvOIkv 0fzw9TCb47fGpWevKrGL9xcNjVQtx2JfZd/iSNQ3f5U62vLsX2kmM+bW9/adxxMAZg dNswxMq0ltMZuwqgQBpumOJ8ugJnn62yZiQmReKzhQKtgrTP+rAP9NN3JkIFn/aHTZ Ml3w52kBfYbQEpP2exL3KnXB0VeM33LyybuKpKgpVyKGAHELdT60y8OQ3qgeUXmlPe gJwlvj4lSG1bfgHz5UAhCv119CGk4KQhBqiML/yc+KG5zwdyv23ml3rTJMWZJROdtv B87VVk1wtJJ4Q== Content-ID: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267444 Archived-At: --X1UB8GRL4Z Content-Type: text/plain; charset=us-ascii; format=flowed Content-ID: I attach a patch which implements vertical display of completion candidates for icomplete. I've been using it for a few months, and did find any bugs. It is minimal (less than ten lines of "real" code), and unlike other "icomplete vertical" implementations, the number of displayed completion candidates depends on the "max-mini-window-height" variable, which means that it is the Emacs display engine which decides the number of completion candidates that is displayed, depending on the available space in the frame at the moment the minibuffer is entered. --X1UB8GRL4Z Content-Type: text/x-diff; name=0001-Add-an-icomplete-vertical-minor-mode.patch; charset=us-ascii Content-Transfer-Encoding: base64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0001-Add-an-icomplete-vertical-minor-mode.patch RnJvbSBmYjlhMmI0NWI5NzcxMmRiYTFmNjIyZjZkZmY3YTg0Njk2YjBmNzFk IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBNb24sIDUgQXBy IDIwMjEgMjE6MzA6MjYgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gQWRkIGFu IGljb21wbGV0ZS12ZXJ0aWNhbCBtaW5vciBtb2RlDQoNCiogbGlzcC9pY29t cGxldGUuZWwgKGljb21wbGV0ZS12ZXJ0aWNhbC1tb2RlKTogTmV3IG1pbm9y IG1vZGUuDQooaWNvbXBsZXRlLXZlcnRpY2FsLXJlZm9ybWF0LWNvbXBsZXRp b25zLA0KaWNvbXBsZXRlLXZlcnRpY2FsLW1pbmlidWZmZXItc2V0dXApOiBB dXhpbGlhcnkgZnVuY3Rpb25zIGZvciB0aGUNCm5ldyBtaW5vciBtb2RlLg0K DQoqIGV0Yy9ORVdTOiBNZW50aW9uIHRoZSBuZXcgbWlub3IgbW9kZS4NCg0K KiBkb2MvZW1hY3MvYnVmZmVycy50ZXhpOiBEb2N1bWVudCB0aGUgbmV3IG1p bm9yIG1vZGUuDQotLS0NCiBkb2MvZW1hY3MvYnVmZmVycy50ZXhpIHwgIDUg KysrKy0NCiBldGMvTkVXUyAgICAgICAgICAgICAgIHwgIDcgKysrKysrKw0K IGxpc3AvaWNvbXBsZXRlLmVsICAgICAgfCA0MCArKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysrKysrKysrDQogMyBmaWxlcyBjaGFuZ2VkLCA1 MSBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pDQoNCmRpZmYgLS1naXQ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