From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: feature/icomplete-vertical Date: Sat, 19 Sep 2020 04:03:36 +0000 Message-ID: References: <20200919015957.prffuac2jke3hp6a@Ergus> Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="-212064758-193014509-1600486739=:11690" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3859"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (NEB 394 2020-01-19) Cc: Eli Zaretskii , casouri@gmail.com, emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 19 06:04:39 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 1kJU73-0000ri-RJ for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 06:04:38 +0200 Original-Received: from localhost ([::1]:59396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJU72-0007GU-TN for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 00:04:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJU6L-0006ps-2h for emacs-devel@gnu.org; Sat, 19 Sep 2020 00:03:53 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:56917) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJU6G-00032e-6V; Sat, 19 Sep 2020 00:03:52 -0400 Original-Received: from sdf.org (IDENT:ghe@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 08J43dBl020952 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 19 Sep 2020 04:03:39 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 08J43rwo003460; Sat, 19 Sep 2020 04:03:53 GMT In-Reply-To: <20200919015957.prffuac2jke3hp6a@Ergus> Content-ID: Received-SPF: pass client-ip=205.166.94.24; envelope-from=ghe@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 00:03:46 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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:256144 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---212064758-193014509-1600486739=:11690 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-ID: Hi Ergus, Thanks for your comments. > > 1) Icomplete shouldn't call shrink-window because the minibuffer resize > must respect the max-mini-window-height and resize-mini-windows policy. > Okay, these lines in my patch can just be dropped indeed. This makes the whole thing even simpler. > > 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. > I see. I did not think about that potential problem before sending the patch. I attach an updated patch (still very short) in which this problem is (I think) fixed. > > 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. > That could be an additional feature indeed. I do not understand why they are annoying, it's common in completion mechanisms to have such indications, but why not. But I think it is better to separate concerns. > > 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). > That could also be an additional feature, again I don't really see why it would be useful, but why not. OTOH, it is not possible to do this with the current version of icomplete in horizontal mode, and again I think it is better to separate concerns. > > 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. > The patch I propose has only five "if icomplete-vertical", that's not much I think. And in fact it's easy to remove three of them, and to have only two "if icomplete-vertical" (see the other attached patch). If horizontal icomplete remains the default behavior (as I think it will), these if's make it clear where the code differs between the two cases. Gregory ---212064758-193014509-1600486739=:11690 Content-Type: text/x-diff; name=icomplete.patch; charset=us-ascii Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=icomplete.patch LS0tIGljb21wbGV0ZS5lbC5vcmlnCTIwMjAtMDktMDEgMTA6MTQ6MjIuMDAw MDAwMDAwICswMDAwDQorKysgaWNvbXBsZXRlLmVsCTIwMjAtMDktMTkgMDM6 MjA6MDkuMDAwMDAwMDAwICswMDAwDQpAQCAtNjIsNiArNjIsOCBAQA0KICAg OnR5cGUgJ3N0cmluZw0KICAgOnZlcnNpb24gIjI0LjQiKQ0KIA0KKyhkZWZj dXN0b20gaWNvbXBsZXRlLXZlcnRpY2FsIG5pbCAiLi4uIikNCisNCiAoZGVm Y3VzdG9tIGljb21wbGV0ZS1oaWRlLWNvbW1vbi1wcmVmaXggdA0KICAgIldo ZW4gbm9uLW5pbCwgaGl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CisJCQkJICgrIDIgKHN0cmluZy13aWR0aCBlbGxpcHNp cykpIDs7IHRha2Uge+KApn0gaW50byBhY2NvdW50DQorCQkJCSAoc3RyaW5n LXdpZHRoIChidWZmZXItc3RyaW5nKSkpKSkNCiAgICAgICAgICAgICAgKHBy b3NwZWN0cy1tYXgNCi0gICAgICAgICAgICAgIDs7IE1heCB0b3RhbCBsZW5n dGggdG8gdXNlLCBpbmNsdWRpbmcgdGhlIG1pbmlidWZmZXIgY29udGVudC4N Ci0gICAgICAgICAgICAgICgqICgrIGljb21wbGV0ZS1wcm9zcGVjdHMtaGVp Z2h0DQotICAgICAgICAgICAgICAgICAgICA7OyBJZiB0aGUgbWluaWJ1ZmZl ciBjb250ZW50IGFscmVhZHkgdXNlcyB1cCBtb3JlIHRoYW4NCi0gICAgICAg ICAgICAgICAgICAgIDs7IG9uZSBsaW5lLCBpbmNyZWFzZSB0aGUgYWxsb3dh YmxlIHNwYWNlIGFjY29yZGluZ2x5Lg0KLSAgICAgICAgICAgICAgICAgICAg KC8gcHJvc3BlY3RzLWxlbiAod2luZG93LXdpZHRoKSkpDQotICAgICAgICAg ICAgICAgICAod2luZG93LXdpZHRoKSkpDQorCSAgICAgIChpZiBpY29tcGxl dGUtdmVydGljYWwNCisJCSAgKC0gaWNvbXBsZXRlLS1wcm9zcGVjdHMtYWN0 dWFsLWhlaWdodCAoLyAocG9pbnQpICh3aW5kb3ctd2lkdGgpKSkNCisJCTs7 IE1heCB0b3RhbCBsZW5ndGggdG8gdXNlLCBpbmNsdWRpbmcgdGhlIG1pbmli dWZmZXIgY29udGVudC4NCisJCSgqICgrIGljb21wbGV0ZS1wcm9zcGVjdHMt aGVpZ2h0DQorICAgICAgICAgICAgICAgICAgICAgIDs7IElmIHRoZSBtaW5p YnVmZmVyIGNvbnRlbnQgYWxyZWFkeSB1c2VzIHVwIG1vcmUgdGhhbg0KKyAg ICAgICAgICAgICAgICAgICAgICA7OyBvbmUgbGluZSwgaW5jcmVhc2UgdGhl IGFsbG93YWJsZSBzcGFjZSBhY2NvcmRpbmdseS4NCisgICAgICAgICAgICAg ICAgICAgICAgKC8gcHJvc3BlY3RzLWxlbiAod2luZG93LXdpZHRoKSkpDQor ICAgICAgICAgICAgICAgICAgICh3aW5kb3ctd2lkdGgpKSkpDQogICAgICAg ICAgICAgIDs7IEZpbmQgdGhlIGNvbW1vbiBwcmVmaXggYW1vbmcgYGNvbXBz Jy4NCiAgICAgICAgICAgICAgOzsgV2UgY2FuJ3QgdXNlIHRoZSBvcHRpbWl6 YXRpb24gYmVsb3cgYmVjYXVzZSBpdHMgYXNzdW1wdGlvbnMNCiAgICAgICAg ICAgICAgOzsgYXJlbid0IGFsd2F5cyB0cnVlLCBlLmcuIHdoZW4gY29tcGxl dGlvbi1jeWNsaW5nIChidWcjMTA4NTApOg0KQEAgLTcwNSwxMiArNzIwLDE4 IEBADQogCSAgICAoc2V0cSBjb21wDQogCQkgIChpZiBwcmVmaXgtbGVuIChz dWJzdHJpbmcgKGNhciBjb21wcykgcHJlZml4LWxlbikgKGNhciBjb21wcykp DQogCQkgIGNvbXBzIChjZHIgY29tcHMpKQ0KLQkgICAgKHNldHEgcHJvc3Bl Y3RzLWxlbg0KLSAgICAgICAgICAgICAgICAgICgrIChzdHJpbmctd2lkdGgg Y29tcCkNCi0JCSAgICAgKHN0cmluZy13aWR0aCBpY29tcGxldGUtc2VwYXJh dG9yKQ0KLQkJICAgICBwcm9zcGVjdHMtbGVuKSkNCisJICAgIChpZiBpY29t cGxldGUtdmVydGljYWwNCisJCShpZiAoPiAobGVuZ3RoIGNvbXApIDApDQor CQkgICAgKHNldHEgcHJvc3BlY3RzLWxlbiAoMSsgcHJvc3BlY3RzLWxlbikp KQ0KKwkgICAgICAoc2V0cSBwcm9zcGVjdHMtbGVuDQorICAgICAgICAgICAg ICAgICAgICAoKyAoc3RyaW5nLXdpZHRoIGNvbXApDQorCQkgICAgICAgKHN0 cmluZy13aWR0aCBpY29tcGxldGUtc2VwYXJhdG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hcGNvbmNhdCAnaWRlbnRp dHkgcHJvc3BlY3RzIGljb21wbGV0ZS1zZXBhcmF0b3IpDQorCQkgICAgICAo YW5kIGxpbWl0IChjb25jYXQgaWNvbXBsZXRlLXNlcGFyYXRvciBlbGxpcHNp cykpDQorCQkgICAgICAifSIpKQ0KIAkgIChjb25jYXQgZGV0ZXJtICIgW01h dGNoZWRdIikpKSkpKQ0KIA0KIDs7OyBJc3dpdGNoYiBjb21wYXRpYmlsaXR5 DQo= ---212064758-193014509-1600486739=:11690 Content-Type: text/x-diff; name=icomplete-two-ifs.patch; charset=us-ascii Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=icomplete-two-ifs.patch LS0tIGEvaWNvbXBsZXRlLmVsCTIwMjAtMDktMDEgMTA6MTQ6MjIuMDAwMDAw MDAwICswMDAwDQorKysgYi9pY29tcGxldGUuZWwJMjAyMC0wOS0xOSAwMzo1 NDo0My4wMDAwMDAwMDAgKzAwMDANCkBAIC02Miw2ICs2Miw4IEBADQogICA6 dHlwZSAnc3RyaW5nDQogICA6dmVyc2lvbiAiMjQuNCIpDQogDQorKGRlZmN1 c3RvbSBpY29tcGxldGUtdmVydGljYWwgbmlsICIuLi4iKQ0KKw0KIChkZWZj dXN0b20gaWNvbXBsZXRlLWhpZGUtY29tbW9uLXByZWZpeCB0DQogICAiV2hl biBub24tbmlsLCBoaWRlIGNvbW1vbiBwcmVmaXggZnJvbSBjb21wbGV0aW9u IGNhbmRpZGF0ZXMuDQogV2hlbiBuaWwsIHNob3cgY2FuZGlkYXRlcyBpbiBm dWxsLiINCkBAIC0xMDcsNiArMTA5LDggQEANCiAgIDp0eXBlICdpbnRlZ2Vy DQogICA6dmVyc2lvbiAiMjYuMSIpDQogDQorKGRlZnZhciBpY29tcGxldGUt LXByb3NwZWN0cy1hY3R1YWwtaGVpZ2h0IDAgIi4uLiIpDQorDQogKGRlZmN1 c3RvbSBpY29tcGxldGUtY29tcHV0ZS1kZWxheSAuMw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