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] Re: Other details about completion. Date: Thu, 7 Apr 2022 20:27:01 +0200 Message-ID: <20220407182701.qzv7iknz7prjv5fw@Ergus> References: <20220406132108.evlofp5l3krsl5h7@Ergus> <86sfqqduon.fsf@mail.linkov.net> <20220406181339.iubahj6fviq3fyqv@Ergus> <86o81eawnv.fsf@mail.linkov.net> <91135A5B-17B9-4B1A-AFB9-40D2656313DE@aol.com> <86ee29pawb.fsf@mail.linkov.net> <20220407090845.rvjzos3pp6f77qrz@Ergus> <867d80c00z.fsf@mail.linkov.net> <20220407172201.qwggexthtersxi7x@Ergus> <86y20g93pe.fsf@mail.linkov.net> 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="16934"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 07 20:28:14 2022 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 1ncWre-0004H8-0I for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Apr 2022 20:28:14 +0200 Original-Received: from localhost ([::1]:54492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncWrc-0002zr-IU for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Apr 2022 14:28:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncWqg-0002Ek-IV for emacs-devel@gnu.org; Thu, 07 Apr 2022 14:27:14 -0400 Original-Received: from sonic316-11.consmr.mail.bf2.yahoo.com ([74.6.130.121]:42480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncWqe-0000PW-0U for emacs-devel@gnu.org; Thu, 07 Apr 2022 14:27:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1649356030; bh=KX1AglAyUCSC5x/SOuMciJWvtHiQjmsnaiJS/ipFQS0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=m/+ywzXK5g3XRKk88RqU+s1nptoOA6Fm1w8MBdoaMoz5iqIN7+QhD0yJmnVFQioWkwIDvZfu84jA4NaMkAnLwiJA32dicsSc4xq5pu86rIDTmgWIfgyuXTueDB0QdGptSjwgigxbW47/MghiWcw5UvUGbKtgLv8GpdiyCljj7QGC02HMn2ogLGZ+9MtH29vhq/V6nawL7PCfGFyBzm0PVGkLCwC1j3VadO53oybtTiN4jPWoyNq0nu6ZuH4TECaXJtxKSWw+H0nQ4sPNUVAP61imvZ+oIUXzzwIKqA3inN/keHzm8Z9eG709OfIw/T8VVsbHbn6LEbm1r7FvxKl/iQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649356030; bh=br5ztGbI8a3AeaBOVYxBpk316uWJtPJ1Owe73WOeObJ=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=RS7B3ka1tozIMz1afcvgRqpyJTt6as0YwsLh6FKngxoW6id/+W8ESX97bLgO8OQwh+A0HyQ+MhnxADL2OwqzlZnTehFJeo8effGs6WnD90dIzGQV4945yY8vapiY6UtaCddGy1sfoQlMEcNCNKLK1LXKG0x6c4n2s8CB9NgvuD3HjnLEHAIQtnjD1r1AYkBmOLtV06kHh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ail.bf2.yahoo.com with HTTP; Thu, 7 Apr 2022 18:27:10 +0000 Original-Received: by kubenode501.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 8fad76196a4461af69c1379b73d9497f; Thu, 07 Apr 2022 18:27:06 +0000 (UTC) Content-Disposition: inline In-Reply-To: <86y20g93pe.fsf@mail.linkov.net> X-Mailer: WebService/1.1.20001 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.130.121; envelope-from=spacibba@aol.com; helo=sonic316-11.consmr.mail.bf2.yahoo.com 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:287900 Archived-At: On Thu, Apr 07, 2022 at 08:57:17PM +0300, Juri Linkov wrote: >>> So why do you think that switching to the Completions window >>> is required to select a completion candidate? >> >> Basically because we don't need that exact behavior in all the details >> as our use case is a bit different different (and simpler). we use >> single commands most if the time. I mean, most of the completion we need >> are for single commands/candidates/files because we can't do things >> like: "M-x find-file /my/file/path" in a single line. (there are some >> exceptions line shell-commands or so... but those are the exception, not >> the rule) >> >> But also because emulating that from completions is straight forward >> considering that Completions is read-only and any edit attempt (insert a >> letter) will emit an error we can handle moving to the minibuffer and >> executing there whatever we need. >> >> zsh adds an extra space before the letter so even if it does not leave >> the command line completely there is a switch to a state where arrows >> navigate, a letter inserts a space and C-g restores to the initial... So >> there is a mode and context change. > >So inserting a letter from the Completions buffer is the only thing >that you miss from zsh? Actually yes, that and remove the mode-line to completions... >But you also said above that this feature is >not important because such cases are rare: "M-x find-file /my/file/path". > I can live with that. Lets say in our case adding a space does not make much sense, but just inserting the letter in place without completion may be a better behavior... But again... I can live with this. >In all other regards, currently it works exactly like in zsh: >'TAB TAB' selects the Completions window, and C-g cancels it. > Yes... >>> But in zsh and wrap to the top/bottom of the same column. >> >> Yes, I already implemented that and you didn't liked because it was a >> bit long ;p... Now this is getting longer and longer.... > >Indeed, its logic looks complicated. But maybe we could implement >simple rules like in zsh? Then ans in the Completions >buffer could be bound to new commands. > Let's cleanup master and move to our own branch then?? >>> Also in zsh TAB moves vertically when columns are sorted vertically. >>> Shouldn't TAB in Emacs move vertically too when 'completions-format' >>> is 'vertical'? >> >> Actually yes... But implementation will be long and ugly... I don't >> think it worth it... >> >> The ideal case may be to have some modes completions-vertical, >> completions-horizontal and completions-one-column that will handle all >> the pack together (bindings, order, formats)... but may break some of >> the external packages. Otherwise we will end with a code full of if-else >> and hard to maintain or extend... > >Looks like the right thing to do.