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: vertical fido-mode (new branch) Date: Wed, 26 Aug 2020 01:11:59 +0200 Message-ID: <20200825231159.spqjswxnrwn36omr@Ergus> References: <87y2ouldrr.fsf@mail.linkov.net> <20200819121755.24hgq4gyba2wkt76@Ergus> <87pn7mdqbe.fsf@mail.linkov.net> <20200820103746.6n5op7dtz563k7qm@Ergus> <87pn7llbnb.fsf@mail.linkov.net> <20200821000513.xqdhsdwxm7ov7fkw@Ergus> <87y2m5jlh6.fsf@mail.linkov.net> <20200824190654.d5obxfwyehdgpr4u@Ergus> <87lfi2sg36.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="36961"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 26 01:12:43 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 1kAi7O-0009WX-Cr for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Aug 2020 01:12:42 +0200 Original-Received: from localhost ([::1]:42710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAi7N-0008RP-Ed for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Aug 2020 19:12:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAi6s-00081m-1T for emacs-devel@gnu.org; Tue, 25 Aug 2020 19:12:10 -0400 Original-Received: from sonic315-14.consmr.mail.bf2.yahoo.com ([74.6.134.124]:34061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAi6p-0001la-6b for emacs-devel@gnu.org; Tue, 25 Aug 2020 19:12:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1598397124; bh=dqmpB9U/QytJ1R8JQ3OkRS9RGbBeGThXMR+9ekusOYk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=dQt0WRI580m7xOf5Ume3n78nSln9u9CuS9XEP3C4rcH1r5cDP8z9x7VmPEm8A0FYnc0uZarLCnXai5a0nqsKDfQLXvGaC+no41SnHizHAAzzZc+sPOiTgrt7UVpFcy2xcHcQdIbNmjm+xV1DSVVqSC4eRSagiExJg3KrtzkPZMp/6Scyh424d5iC4h68YB81S0PmCQk5Nu64i3loGMIy4lWFwaOiKtaLCdGqyE3R5gjQJD9p43ZUemCRf8180GJJRs6vRaHE1IG7cbVM9QKYHH4bbBwAs92A7zkRzfXDYo1ci6jXmy4T8Ihj7/5tx/Da7ju1s2ebxpe7EoPcj62xCg== X-YMail-OSG: ic_zvvYVM1mI5QkMELEEhYBxnaY2VSjMQ9iXb02wPPV2UVHws9vZEWnU63AEFEX 3IWyhiQIyW.Mv2zovgtE9.3mj2bsJL7BTdq7VW9U6qllQQgRhDABK5ypm5a.sX_E0vZvC.3zF1V3 Pf50qTmcead9XeZ99_KJR.4uApTz3a3EPCNQ3CB89PbbyCTG5iK3YHmqP9CF_XzS_dMFOIQCbP4T i7AocqrvfkzQyLIvnid_BW_2RUdXmWizaedbFj0G1Pzzi77CkzI7kyTSrRIqEXmD9FsJk3QzO6Jj cJUwXqf_wjLxUNtLOTIsIHSBIQACJg1mWMgEIhWTs0NSq1NtkxHqvo3Bz2demBE2YZRpij_Um2Jp VIJDFFWrhmBislF30e8aMbummGgTFRtw3cXlsPpYSfAdJTznh9vUlu2pmED.isKVPYGqhY_XcxIS rkNAH.YwS1e5zZ_ds7K6GDWkWxEjYWF.opbqeptkO4Ug_HT8MLHok50KdG7tsBalt.7d14txV0rb CTvNZklb3EzVxa2VanEL7Kkhtp0F31h.jM39HlqH0CP5LWL_d9Syy6pFM0YDWWXmKAb9cgUEiI8l KSWic_kH3Tv2v3dcoH1VMu0sQGknepZwzTWBar.Bqa_0E_ULMP2ZZlVYTVScNaEXTtKIUNySEuY6 9vrINACFYe66C049WK31ziaC8QMKNtI8Uq8zFEkC_k9EDdx0C6Qi1OMgBlOlqjNIHhNVtgTIu29I .WC1Ct6ei5Tayj1d.AkRgdGY2FPiJR9lJqRnpOENaSV4tz7UhqBUGyhlYGswfB1Q7UmfikDgf_cK EkYLsCoDR8b2AgcmjRr6664DsV0Mb0Z6uVQ7hYs4pN Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Tue, 25 Aug 2020 23:12:04 +0000 Original-Received: by smtp402.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID d546dd278b8bd50b96f0967938b435f0; Tue, 25 Aug 2020 23:12:03 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87lfi2sg36.fsf@mail.linkov.net> X-Mailer: WebService/1.1.16455 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.134.124; envelope-from=spacibba@aol.com; helo=sonic315-14.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/25 19:12:04 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:254230 Archived-At: On Tue, Aug 25, 2020 at 09:55:41PM +0300, Juri Linkov wrote: > >> If this patch is too much code for adding in simple and minibuffer, I >> would try to make a separate file with a mode. WDYT? > >Maybe initially this could be a separate package to allow easier >experimentation with it. Later when it works well, this could be added >to core commands. > To do so I need two changes in the emacs core that can't be implemented from outside. 1) The hook - (if win (with-selected-window win (bury-buffer))))) + (when win + (with-selected-window win (bury-buffer)) + (run-hooks 'minibuffer-hide-completions-hook)))) Maybe there is a hook like bury-buffer-hook or something similar; but I am not aware of it. If so, then I could add my function in that local hook in *Completions*. It is tricky, but it could work if we don't want to add another hook. (But I would prefer having the hook) 2) The extra condition in completion--in-region-1 - ;; If end is in view, scroll up to the beginning. - (set-window-start window (point-min) nil) + (if (and minibuffer-tab-go-completion + (pos-visible-in-window-p (point-min) window)) + (minibuffer-next-completion 1) + ;; If all completions are visible use tab completion + ;; If end is in view, scroll up to the beginning. + (set-window-start window (point-min) nil)) I think that we can modify this one to be more general using a funcall or so and make my function to return t on success or nil if we should go for the `else` part. I can add these two small changes if you think they are fine. If so, then the package can be added as an extra file and I could avoid messing up even more the simple.el and minibuffer.el. Even enabling the mode by default (if we decide so) it could be in a different file for simplicity. BTW I am implementing also a vertical icomplete. I will upload a feature branch in a while. Could you try that? Best, Ergus