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: [PATCH] Support "\n" in icomplete-separator Date: Fri, 6 Nov 2020 00:57:35 +0100 Message-ID: <20201105235735.oxouuek66ehu5o45@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="15285"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andrii Kolomoiets Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 06 00:59:22 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 1kapA1-0003t6-8j for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Nov 2020 00:59:21 +0100 Original-Received: from localhost ([::1]:43188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kapA0-0003No-BI for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 18:59:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kap8o-0002sK-Gu for emacs-devel@gnu.org; Thu, 05 Nov 2020 18:58:06 -0500 Original-Received: from sonic312-21.consmr.mail.bf2.yahoo.com ([74.6.128.83]:36170) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kap8j-0007DM-7I for emacs-devel@gnu.org; Thu, 05 Nov 2020 18:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1604620674; bh=MQT/nUZM+MNWa++Qg0XIkwK4JOh3G5TuCR81DxQKj5I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=nlwitx3kszhBDILAl78yPMJn7dXdJ8qHK6wK62MTRWLCH5YSwn19Tj0gQTGOErY2zwr037WH/4iCYl3jWVrhiPr0yPXnzhT0sD4M6uFYo/WigDGFWnu4aZuhDEva52qwZtGk7qpDu2staUBTE6JP4tVAMy/zSb7jU2yTm4NtnMOsqRqL78IER7qUg7g+oWNeZt1vzOuXGGSgdjVQ3CNtJE6KtZmUIM2vN2O4vdzvDSGYQ9/9dwvsEcjH9DDUfls/v9d+apgrWMB28VH7a1vnjhiSwWVQ3CKdnGwwntoBlL9HTEeIj8l40+WhgCXBeMxeIJguZP6GGVsYlSVkHnjOcw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1604620674; bh=2PqnPAbwlsXS8QfUfJ0ASBPVMvRUHOR5UtX6pdOA/XB=; h=Date:From:To:Subject; b=NEx+fcwEOldKxV9GE1VxWwTfx8Oehqr+I70+G5TYksxPgcfBWfVm0Ows9S6wv/ALX/ErLIWYcmEe2/DUuFPPznme5y9VtclBxB4w3O3ksPHiatjzn38w1+lbvA4b6mnHZNjGAfOjG/L8NeyKvAFO4UgdccBO/sbkCommStNhQCnSEl4E2nhcfSTmqQjxIOHYs7MpAwugYGZA4NQdUuL4oXnFhsi20VJ3c5zCsDpeI48ISIrBZuDdsXzU1QHTqXPuekf7nh5AWdfB0rtOJ3ZiyB/YuPTM9SH6hdHeQamX1jWa49IpSriF3rST9wxI5HFNP83s5nnGKh47EjuIZI30CQ== X-YMail-OSG: REyB5VgVM1mdyfvRQlmHfTYj0F02p6EXrQT8mCoyk6F91AT6UJUWJCa8smE3VZO 7NhwKz6g08tYCHrRduUhtVl_6oBOe8bsyW767TK_dUfLuyqeqaoULR1_uitIuDVBE1.zqjNx9XST 1DseYrjveexb4w779cCUjWzL7cnT08VTAuJNT1SAW9wawngMSPt.PN_Urok42MPb.TM3G6n_ZS.Q kG9sXeZ3hQQTBQubSynEvY8t_1oAF28Omu5QclXuPRkVboiG.h6AIZO.mT37CNglghxxQufau2sa uS7_Hu.Aw8.nMjwXke3u.EFBWdyN.WGVW7hlTkqnLiT7Xj2dVSMNhwQKRFpKN7dBeGjvUZc4_nHU KDLbpAwnTYHeXInwTUoIp3m1MBiddwu7ni5ei.jgmdT8ADjSy4Y8lAJ2f4Rrq7mNd4XEgcu6.R._ ctWQ3HH7Budcx5x6TaTOJv5pbQmTcp1cMcAszp1Wc2geitp4_usCP8xbX_w_9o.Gp7z9PBwB25sm kwpjKM1vv2hPOz88Y6vQSGbno66.bgcS9T62jxCTjKluJNYVxepP8NWZhJDxOrANm79egXl_kijz T7t5czTn5DQTqPEW8.yiwEkNsxN6QLUmEBbOe8oQO0A27egH90FsUhz5uIrdxzDv9qWMxTB3d4cp q8h.FbK4ep1lwL1YjZah13JJhyapNUe.DfLAV_h3UgMjR0t.YvriVJbVc_CBlq2J8gPghs40.wCq nSdEJ73UfHPSQ25kyYeMmWZWM4zZt_XAaMkT5enUPjXBsZhGrkqcpJyDZTBL3Xq0f_rLnAAp_T9B Py.m2BXhjir3FaEq6ijbl2tknpTsuCe6rQEmY_d2Kl Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Thu, 5 Nov 2020 23:57:54 +0000 Original-Received: by smtp410.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID fe126bf60ed82b95eb990fa7917e1c49; Thu, 05 Nov 2020 23:57:48 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.16944 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.8) Received-SPF: pass client-ip=74.6.128.83; envelope-from=spacibba@aol.com; helo=sonic312-21.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 18:57:55 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:258771 Archived-At: Hi Andrii: Yes, this is more or less the same in implemented in the branch. Please look at the emails I sent to Gregory some months ago about this approach and Gregory's answer. What you do in the patch is basically the same that is in the branch, but there are considered some more user requested cases like multiple \n in the separator, using a different font size in the minibuffer and display the completions in window-only frames like in mapple, or having a first candidate longer than a single line/occupying multiple lines. On Fri, Nov 06, 2020 at 01:10:20AM +0200, Andrii Kolomoiets wrote: >Hi, > >I'm a bit late to the icomplete-vertical party, but please let me show >you my approach at supporting "\n" in 'icomplete-separator'. > >The main idea is to treat the 'icomplete-prospects-height' variable >value as the amount of completions we want to see if there is "\n" in the >'icomplete-separator'. > >Please see attached patch. > >Also see attached screenshot of minibuffer-only frame after: > >emacs -Q --eval "(setq default-frame-alist '((minibuffer . nil)))" >M-x icomplete-mode >(setq icomplete-prospects-height 5) >(setq icomplete-hide-common-prefix nil) >(setq icomplete-separator "\n ") >(setq resize-mini-frames t) >M-x icomp > >If that approach was already discussed, please let me know. > >WDYT? > >Thanks!