From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: feature/icomplete-vertical Date: Sat, 19 Sep 2020 03:59:57 +0200 Message-ID: <20200919015957.prffuac2jke3hp6a@Ergus> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36008"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , casouri@gmail.com, emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 19 04:01:05 2020 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 1kJSBU-0009JM-MF for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 04:01:04 +0200 Original-Received: from localhost ([::1]:40478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJSBT-0000JN-HU for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Sep 2020 22:01:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJSAi-0008Ec-C7 for emacs-devel@gnu.org; Fri, 18 Sep 2020 22:00:16 -0400 Original-Received: from sonic310-15.consmr.mail.bf2.yahoo.com ([74.6.135.125]:43591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJSAf-0000rf-7z for emacs-devel@gnu.org; Fri, 18 Sep 2020 22:00:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1600480810; bh=zrx7PcsRzqwZPo1YOfxfUfMK9tQcFD4NY57qmT79F70=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=VYpcDc0kV8Bk6fgUbxX0H0MEC6l1jt5WbHvCxbq6u+H1U9uO00bucLntAmE4AUjFB5dx09ZeZJnQLWKhoJo2EW8nMCkoIx25rqT9/Hef5ZvqbR6bDYM25SwM2vysGzvPYZ+ZHsibDPK2FyBsUUBznzTaUpg+KBkTei7qsfgRq+QCCJu/3YbyLKqsaTgddh/qk6rNc1wup7GM1SuGXsUdORrBp5S5YU5aemqHWLNxX84QDyXs5FsMko+IbdaB/ivjkhAFu8dr8T8X5JgFiEodip9BI7eFA++pwAqvHMoncAPTlKunKuzNnvOm8+cFjFk4pXArpPXbCQOXbuOP2w6m5w== X-YMail-OSG: KT9cSoQVM1lsguRnhHtB7vQUTZpiaQMm4QWUNGdhl1ulu6I3IhIl2Zn..Hw3VIj Ub84O4ELW8fTpnrTSc52HBus_loEh9y81sqau0w4MHyTRN1uy4XEs1g8jujnh3ABe2PFuuhX3mwN DNnNMaioylHUXYKN.NCeRC3d4UIRINGZqvopc1MkHhTUTj0J3lbzJZESJue5GZJl6jLkpDaRm2Ac A8Lsiu30AH0OmicjIizXaY_iJszXhWdqu01xzzvMRbNxgh4aXvqPuHSnURhz1FmHAHBog1i3m1gs ppdP.GSnR8f44YSojux7m6lsleH8Xy8.u4F1uhUIZ5ChSCmli_EHoaWKmexz60ac1BJRWb5LlQna 30VihVT0Mb2_vW7zHPwnP_jLzqn5cGWfrFT5.djk2ltX.PO80zJSG.7rvGyWVS_3VEk10M3YBAZT hL9O6Cxvj07YEqGW1iapCuZ6lyqoNuA.m8FAxJ04sHAgP6r8nC9tRvuBxsBuiizTveSDGQulBYMG O9xn_3WdkFx0vItUNJKQxPDZkXhHIsQK.6dNj3amk0YfP6FUkbfFL74exhaUz3pGd9bO.8Y6L.zb ESUWAEYhxhDQKJmUHFV_8EKi6TdmK9wAnKuGfC_SYHeOwUubIebxGAqOdNIorFbzDggKNUdq52Oi 484GYfNUH8RBPxX7MgD1fPpzp8RGia4z71XOjBkdM9nI78JOgZWJaiR.CC6AZ5W9IXSdW_YbZf1l IJ4nc3sPLCVsaaYCe._.VY9Zh3bmSQr5okoptJvwxJBN3Aq0Ybf1O26gIipX9FVrmfIDZ_ImKbms 6a6H9t1Ur0UYVs6SXvkhD3KLA_Ako6QElgacEXSpJc Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Sat, 19 Sep 2020 02:00:10 +0000 Original-Received: by smtp411.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4b0f2c22aad6cc64ae87526efc32b8ff; Sat, 19 Sep 2020 02:00:05 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.16583 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.135.125; envelope-from=spacibba@aol.com; helo=sonic310-15.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 22:00:10 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:256141 Archived-At: On Fri, Sep 18, 2020 at 09:39:58PM +0000, Gregory Heytings via Emacs development discussions. wrote: > >Hi Ergus, > >I don't understand why you change so many things in icomplete.el for >icomplete-vertical. I attach a patch which implements >icomplete-vertical by adding only 20 lines to that file. It seems to >work correctly. Use it with: > >(icomplete-mode 1) >(setq icomplete-vertical t) > >and set `icomplete-prospects-height' to the maximal number of >completion candidates you want to display, for example: > >(setq icomplete-prospects-height 10) > >Gregory Hi Gregory, thanks for commenting. I know the branch has too many changes. Usually I do a full refactor and a squash before merging to master to simplify all the experimental things I try during development. My error was probably to call it feature and not scratch branch. The changes I introduced are actually not too many, the others are just details and customs to avoid to interfere or changing the defaults of icomplete while developing. Most of them will disappear in the final patch or come latter as different features. (I have the bad habit to overwrite too much my histories ;p) OTOH: The problem with the approach in your patch (that you can see is essentially similar to the first commit in the branch) are basically: 1) Icomplete shouldn't call shrink-window because the minibuffer resize must respect the max-mini-window-height and resize-mini-windows policy. 2) When using different fonts (as a user jixiuf did) the prompt disappears because there is a mismatch between the visible lines and the ones the minibuffer shows. So we need to fix that in a general way and calculate sizes in pixels to avoid this problem. 3) In vertical the [] and () are annoying; more than in horizontal so we should give some control for them. Now there is a mechanism a bit complex, but just because it is under development. I am actually trying to simplify that. 4) Even in vertical the icomplete-separator must be respected somehow because some users reported to use it (with the external package) to separate the candidates from the left of the window, add prompts and so on. (for example adding a > before the first candidate (changing the {) and a space before the others (changing the separator)) So our changes need to support all that in a simpler way. Also some users requested to have two \n as a separator (don't ask me why). 5) I opted for a more modular approach because filling the code with several 'if' it harder to read and very error prone to maintain latter. So I just separated the setups when vertical and horizontal so if we want to add more policies and features we have to deal with less race conditions. For now I am only worried about functionality; when that works as expected and cover all the popular use cases I will cleanup I promise :) Best, Ergus