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 11:56:19 +0000 Message-ID: References: <20200919015957.prffuac2jke3hp6a@Ergus> <20200919061531.oyjlbdvkbeif5fsg@Ergus> <20200919111927.v6ixssp3w2t6ow3j@Ergus> Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="-212064758-688421560-1600516452=:11367" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38213"; 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 13:57:19 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 1kJbUV-0009qy-Go for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 13:57:19 +0200 Original-Received: from localhost ([::1]:39242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJbUU-0000gM-JE for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 07:57:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJbTo-0000EG-5R for emacs-devel@gnu.org; Sat, 19 Sep 2020 07:56:36 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:57210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJbTl-0002nA-Jx; Sat, 19 Sep 2020 07:56:35 -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 08JBuLVn028231 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 19 Sep 2020 11:56:21 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 08JBua0o007855; Sat, 19 Sep 2020 11:56:36 GMT In-Reply-To: <20200919111927.v6ixssp3w2t6ow3j@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 04:31:01 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:256161 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-688421560-1600516452=:11367 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-ID: >> - when the current line after the prompt is too long the prompt >> disappears > > Yes, set visual-line-mode -1 for this. Is the only solution so far and > what I will do in the setup probably. > No, it is not the only solution, my code handles that case without using visual-line-mode. By the way, I just checked it (with your code) and apparently enabling visual-line-mode does not solve that problem. > > Did you applied the patch cleanly? > As far as I can see yes. I already tried your code twice, did you try mine? I attach the improved version which handles the minibuffer-only case. Anyway, IMO you not are using the best approach on this project, you are trying to do too many things at once. Completion mechanisms are a very complex thing, and I believe the best way is to do small incremental improvements with minimal changes, and to test them thoroughly before implementing the next improvement. ---212064758-688421560-1600516452=:11367 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 LS0tIGEvaWNvbXBsZXRlLmVsCTIwMjAtMDktMDEgMTA6MTQ6MjIuMDAwMDAw MDAwICswMDAwDQorKysgYi9pY29tcGxldGUuZWwJMjAyMC0wOS0xOSAxMTo0 OTowOC4wMDAwMDAwMDAgKzAwMDANCkBAIC02Miw2ICs2Miw4IEBADQogICA6 dHlwZSAnc3RyaW5nDQogICA6dmVyc2lvbiAiMjQuNCIpDQogDQorKGRlZmN1 c3RvbSBpY29tcGxldGUtdmVydGljYWwgbmlsICIuLi4iKQ0KKw0KIChkZWZj dXN0b20gaWNvbXBsZXRlLWhpZGUtY29tbW9uLXByZWZpeCB0DQogICAiV2hl biBub24tbmlsLCBoaWRlIGNvbW1vbiBwcmVmaXggZnJvbSBjb21wbGV0aW9u IGNhbmRpZGF0ZXMuDQogV2hlbiBuaWwsIHNob3cgY2FuZGlkYXRlcyBpbiBm dWxsLiINCkBAIC0xMDcsNiArMTA5LDggQEANCiAgIDp0eXBlICdpbnRlZ2Vy DQogICA6dmVyc2lvbiAiMjYuMSIpDQogDQorKGRlZnZhciBpY29tcGxldGUt LXByb3NwZWN0cy1hdmFpbGFibGUtaGVpZ2h0IDAgIi4uLiIpDQorDQogKGRl ZmN1c3RvbSBpY29tcGxldGUtY29tcHV0ZS1kZWxheSAuMw0KICAgIkNvbXBs ZXRpb25zLWNvbXB1dGF0aW9uIHN0YWxsLCB1c2VkIG9ubHkgd2l0aCBsYXJn ZS1udW1iZXIgY29tcGxldGlvbnMuDQogU2VlIGBpY29tcGxldGUtZGVsYXkt Y29tcGxldGlvbnMtdGhyZ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AgICAgICAgIChpZiBsYXN0IChzZXRjZHIgbGFzdCBiYXNlLXNpemUpKQ0K IAkoaWYgcHJvc3BlY3RzDQotCSAgICAoY29uY2F0IGRldGVybQ0KLQkJICAg ICJ7Ig0KLQkJICAgIChtYXBjb25jYXQgJ2lkZW50aXR5IHByb3NwZWN0cyBp Y29tcGxldGUtc2VwYXJhdG9yKQ0KLQkJICAgIChhbmQgbGltaXQgKGNvbmNh dCBpY29tcGxldGUtc2VwYXJhdG9yIGVsbGlwc2lzKSkNCi0JCSAgICAifSIp DQorCSAgICAoaWYgaWNvbXBsZXRlLXZlcnRpY2FsDQorCQkoY29uY2F0IGRl dGVybQ0KKwkJCSIgXG4iDQorCQkJKG1hcGNvbmNhdCAnaWRlbnRpdHkgcHJv c3BlY3RzICJcbiIpDQorCQkJKGFuZCBsaW1pdCAoY29uY2F0ICJcbiIgZWxs aXBzaXMpKSkNCisJICAgICAgKGNvbmNhdCBkZXRlcm0NCisJCSAgICAgICJ7 Ig0KKwkJICAgICAgKG1hcGNvbmNhdCAnaWRlbnRpdHkgcHJvc3BlY3RzIGlj b21wbGV0ZS1zZXBhcmF0b3IpDQorCQkgICAgICAoYW5kIGxpbWl0IChjb25j YXQgaWNvbXBsZXRlLXNlcGFyYXRvciBlbGxpcHNpcykpDQorCQkgICAgICAi fSIpKQ0KIAkgIChjb25jYXQgZGV0ZXJtICIgW01hdGNoZWRdIikpKSkpKQ0K IA0KIDs7OyBJc3dpdGNoYiBjb21wYXRpYmlsaXR5DQo= ---212064758-688421560-1600516452=:11367--