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: Mon, 5 Oct 2020 06:48:23 +0200 Message-ID: <20201005044823.b2ougsrgcpvsuj74@Ergus> References: <20200912133311.6ujtgczj6wyclufy@Ergus> <20200920130435.heye7bk73pm252km@Ergus> <83sgbczj0i.fsf@gnu.org> <83lfh4zfml.fsf@gnu.org> <838sd4z6lz.fsf@gnu.org> <20201001164804.mqqyxtet4ttweuyv@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19308"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , Eli Zaretskii , Juri Linkov , Yuan Fu , emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 05 06:49:38 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 1kPIRN-0004tM-Es for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 06:49:37 +0200 Original-Received: from localhost ([::1]:57234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPIRM-0007Le-Hc for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 00:49:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPIQV-0006tA-J5 for emacs-devel@gnu.org; Mon, 05 Oct 2020 00:48:43 -0400 Original-Received: from sonic306-3.consmr.mail.bf2.yahoo.com ([74.6.132.42]:44929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPIQR-0006Qn-Pu for emacs-devel@gnu.org; Mon, 05 Oct 2020 00:48:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1601873313; bh=Xhpi2d0N8cRa/tuX8eHBg9cOPg9Rghj4FG08CGGULZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=EQZOw8C/iN86MV7FZ19agmVx0H/LIA/hF5lUWgSSiEGvnrlqTXbTTlQ33KG7th72HF8qxMJ/rUwlVvK6E7OZ5GQiMX4BS+NbEn4ra6B6t2Tgk8qX5OT3/zCK/5+glbafkXgj3ATRftkqvItSzKF0WXEW2r4cB/oM/kgGotQ7wsnPtci9ktNeAvJWZ1IEVlvL82KUEkJQctfnye10bk+msEGyK6GOJ9zcbntwYzp3nJJqhLaoL8gHHV13n6tYCzKEGIbKbNNSAWZhgesbgPpptaSALK16C/W+b1NEkObO3gRmzKcn3142ma1NWwl3EHZrgwB1+utMWiUB0ptwwri1qw== X-YMail-OSG: sfnx638VM1nIJ0aObYcADDebGipMVcbXeWXip0gYeQAcvj6JCjasGWyWcSkmOjK zidDxl5bx88fSpO39OdTsKjvjSD8KZpZNlFdeoN7E8o6SNLzLtVDMrArL0JQ7TaiexEEiOjW5O4. 5Zrbhk45klaZCs.0wKMxAPzm14Y6yjtqdF.kv1k4uk3L2MB9NVcWNW5eR_g3Wpp_sPzakXxIQNMI s0qolDS12kKZEIYrONhtXzplO4nzwblik2s5DBXQOFigKZ4Lzrb69u4alJkilPMU2Tzd1TS2aODb 4yBb9_sprWteGrOFTEMAO8YITx54_pAk_aX4PpnU25IaNFsMBvNR9BtKaHUImK.Uy97FlzbUiE6O V2Z2Bx_zPJbimySCuiD4EBYwgqEl3pjtH69nnaTxxNu4dcOFUVlIo_y78RLgT.VbgkRsSasWVBBS Enk.AU2Fdx.EJVvTKP1FCShKSOr_kGC7tiPs1sXQAYQ_naMkD014smYunAtK3i10m4KF7nabYLbt t1h4PHf8Us6bFBuuPjEsEhfJ2UH8oU2V9Qo31MjFLC6.RvepjU_KCwUVGZUFF40dUtF.K8_RzAqj QlREiAST4gHCyxHzrd7_casRX9vD6tRtBHlouGdfwRJQKEb5O4hnaI6rnwnOPBDn4OeV1e.9E1HI S1lQ0KMUCnNt49gggitwZXB8RIeAf5SPUfx5NLjy7bdTxrPRcSSrOFdC8plR54XBobYPfS0TO3O1 cV6ozEkJnxyU4jQOZVOXKoJVWQmMLprBM_i5IKBK4OK1eUeZvddAXbIcc6nydEfD9HqGWBioxZLQ NvMPkG1BABc7DJER8e1om.Pxcmx9yF_sqBWIDRwUGt Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Mon, 5 Oct 2020 04:48:33 +0000 Original-Received: by smtp422.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID b6a806cfd5adfa96f7f872d2849b3169; Mon, 05 Oct 2020 04:48:32 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.16718 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.132.42; envelope-from=spacibba@aol.com; helo=sonic306-3.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/05 00:48:33 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=unavailable 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:257071 Archived-At: On Mon, Oct 05, 2020 at 12:47:39AM +0100, Jo�o T�vora wrote: Hi Joao: Please look at the previous messages in this same thread to see the problems with your approach. So far there is: 1) The problem when using different font in minibuffer reported by Jixiuf 2) the long line issue from Gregory (but also mentioned before) 3) the ellipsis issue mentioned by Eli 4) The prompt issue (which seems is not going to be solved as it is more a design choice or a feature than a real issue) 5) Respect the user customs max-mini-window-height and resize-mini-windows so we shouldn't call enlarge-window and as an core package we must not conflict with such customs. 6) The removal of {} in vertical mode because in that case they are redundant. 7) The compatibility with packages like maple-minibuffer reported by Dimitry. 8) The case when using multiline separator. 9) Move the first candidate to a newline instead of keeping it inline. The patch I propose is not complex at all considering all the above conditions. The only complexity comes from the height calculation in pixels which is something that will need to be done in any case either for 1, 2, 3 or 4. >Hi Ergus, > >Thanks, I had a look at your patch. I'm personally not too fond of that >kind of >complexity coming into lisp/icomplete.el especially when then are simpler >formulae for achieving a funcional vertical icomplete system. My solution >is even >simpler than Gregory's for example (and based on his): > >(setq icomplete-prospects-height 6) >(setq icomplete-separator "\n") > >(defun icomplete-vertical-adjust-minibuffer-height (completions) > (let* ((comp completions) > (complen (length (split-string comp "\n")))) > (if (> complen 1) (enlarge-window (- icomplete-prospects-height (1- >(window-height))))) > comp)) >(advice-add 'icomplete-completions :filter-return >#'icomplete-vertical-adjust-minibuffer-height) > >So, in my view, all that's needed is to fix the window height problem >(addressed separately >in a discussion which I haven't been following), and then add sufficient >hookage so that >a _separate_ icomplete-vertical.el package with all the advanced features >you are working >on can be developed. > >By the way, do you mind listing here exactly which ones those are in >relation to the >system attained by the code above? > Look at the other branch I mentioned (completions-highlight-modifications). I want to bring such zsh-like completion style to icomplete (when have some time). It must be simpler than in the *Completions* because it won't need to switch window or add overlays. Ergus >Jo�o > > >On Thu, Oct 1, 2020 at 5:48 PM Ergus wrote: > >> Hi: >> >> I made some corrections to simplify the icomplete-vertical feature >> branch and pushed (forced) some days ago. (sorry for that, I should have >> used a scratch branch instead) >> >> Now the icomplete-format variable is removed and the user only needs to >> add at least one '\n' to the separator. I also use >> window-text-pixel-size to correct the issue with long lines but still >> perform the height calculations in pixels to properly show the ellipsis >> as Eli recommended. >> >> I keep the funcall approach because IMO it is cleaner, and reduces >> unneeded and redundant things. (And because it is compatible with >> something else I am working in) >> >> If some of the previous testers could give it a second try. When it is >> fine I will add some documentation and merge in master. >> >> BTW: If someone could give a look to the completions-highlight feature >> branch too and make recommendations, report issues? >> >> Best, >> Ergus >> > > >-- >Jo�o T�vora