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/completions-highlight-modifications e3c5b99 3/6: Add completions-highlight-mode initial implementation. Date: Thu, 19 Nov 2020 04:25:19 +0100 Message-ID: <20201119032519.lpa53ixezgpdppze@Ergus> References: <20201115023629.19537.77471@vcs0.savannah.gnu.org> <20201115023631.C78AB20A27@vcs0.savannah.gnu.org> <20201115224943.o5r7lkkblmyt2ox4@Ergus> <20201116033719.63dryvqm4ozfer2r@Ergus> <92f3cbd7-29a0-461a-a023-562bc6020ea8@default> <87v9e5herj.fsf@mail.linkov.net> <20201116102729.ywubtda6cqdzc45z@Ergus> <87d00acuh3.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="19759"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Drew Adams , Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 19 04:26:34 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 1kfaag-00051X-CY for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Nov 2020 04:26:34 +0100 Original-Received: from localhost ([::1]:57498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfaaf-0003i6-Do for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Nov 2020 22:26:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfaZz-0003Gx-Fq for emacs-devel@gnu.org; Wed, 18 Nov 2020 22:25:52 -0500 Original-Received: from sonic315-15.consmr.mail.bf2.yahoo.com ([74.6.134.125]:40815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfaZu-0006wC-W1 for emacs-devel@gnu.org; Wed, 18 Nov 2020 22:25:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1605756341; bh=HYYNlDLqAxnyxOo9HddFPYfRa9LAaKXZtT8lsUkkKKI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=WYaJystZ4j/tr2beiSVvN1e9IJpwOKyw3MdHKHiQ6INwSUH9O9ggEWaGGxf2Hsz42kE2/SAIf6aQbM7T1gf3Q9KCs/GAbp1xnzB9HLc+pVU/2/iwFWUSBc+WvyjhEdR1fojI3XUAvPPw99cRDBF4LiW0mP7jPj9ly74m2YF7tLkXOZ5BhPkpVIzEW0aHVIeGPy6IMe1PzOkW5UtOUEFawz/uxBo42be7QcDpzfkxRyatHNgBovhQNBaT18879cFq1LODGtvwQN5apP4oKuqF0JedDJBGws1HmKXz7cAXuBpUHRIqSBxpPQiQnrhhyevMwknqyB8D0H1UZRi5eOQ3yA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1605756341; bh=nhevjdHSCYKlL96Uhq4YLlxrcGpdaqMZAZne/nSaD4t=; h=Date:From:To:Subject:From:Subject; b=YXBovII/tE9b+QGfC1+yzhpDG/kvQ2ySyXa74Rezm7dmgHpIULhhruFkCsFAo2P94fGID5gZLDvZQS1c7pxzhnUxt9XCXXcVDnxUV3QLZ1HeSo54iHIN2/ypOhBm9R4uZVd0jQSyJlPPAAv1RiojcZ4R30f+diI5haxvqqR0drcizPYew2jAobbXXHW5bxU6dC0LBmx+bVGlupGMeSumKNUySmrOSOmkPtNRJk5q3KbTJGoP+Isr1244TgTvnLRlkaXi2iL0Mz/dLGD3sk/jwRndx44/ZyHrxA/wkhdjzLJW/DZrrhKPPDaA8DWOdar0qyRWTZe9rBl1d2DsNM66Ww== X-YMail-OSG: .X5483YVM1lcGPpQYlSTTPXeKKN7iXjoj8rI02UNJyV.WdmoraE2_Gc6VIlD8UQ rr_RLzeVWR0svPIOArCvE7H64BiMIdgVwEv3isWm6ktdaeevXDLVBxHR.ARW.kWTOxeYnxos6_Ev O8QWGxmjL3CmH4hTWuelbhPbUmwnP7CqGbwsNzsZnhffa5RcFbOuLXAPXeD3g8wQx.wrn3sS_0fm XaQprml78lWQFnMlybjmR_sCngku40ksz8waOdOqySEiCpSFxVKyMR41NzQ.56lmOrRbVLV89dje Oc7IdOZGdetS_mNGENfi6Bz4CmmoTuZCfQl786w5bcvO.UsgVtOkK.c3byQ0ZKELZL1fyJvBF48k m2RuZ_OmXijp86waBswOYpCAA_9sE3bh35MVBPU.9W3bpbt0GAYXqPi5E1Xv.FzXrqKPcrPriudS LZxJ43jxnrx7Lx3.LWNXFw8rcStF6iTDCuPppCJ0DtLt_udamLbEnCnr4UBTYEig51Vly2uaWdb8 FBj.p16HaPKVjl5.X3GjzEI1Ds58rBARAUhs5mqUh5mZeZrA4pt_EztEgPixoxqhdFOPd8L9mwbr mqwRQ4sYlEAcGcBPEvTmBvmLFL2Un3ulMmgKbcyT0mW_mMY8QnxT8DFRFcb.3F_3rpJkagpU5gua NHTxjU4WwejDn8A1u4w1btQKrZXeuyeZTsERhGEKJANkZWAKatpKjzO1MkMP91fTmMn2hEIlDsmk zIRBw8BqHqdH76LUsOqY9VO9kZXG797DV2zWOnNCjV4.eO31CYbAkahQC.KEbGWgbvARDfquFQEL vjmpQrLhsptedGOjqNvO7oASSZoTsOxM63cWHgExXO Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Thu, 19 Nov 2020 03:25:41 +0000 Original-Received: by smtp403.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a2d56961608514b4773ea6346b7da88c; Thu, 19 Nov 2020 03:25:31 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87d00acuh3.fsf@mail.linkov.net> X-Mailer: WebService/1.1.16944 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.8) Received-SPF: pass client-ip=74.6.134.125; envelope-from=spacibba@aol.com; helo=sonic315-15.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/18 22:25:41 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:259409 Archived-At: Hi Juri: I made some of the changes you suggested, I think the behavior is a bit more reliable now. On Wed, Nov 18, 2020 at 09:43:28PM +0200, Juri Linkov wrote: >> The code is extremely simple, so, if you think you could improve >> anything it is more tan welcome. > >The branch contains many different features with different problems, >so here is a short summary for these 4 separate features: > >1. feature of setting minibuffer-tab-through-completions-function to > completions-highlight-minibuffer-tab-through-completions: > >The problem is that such TAB cycling is limited only to the case >when the whole *Completions* buffer is visible. > This was as I said intentional. And to change that could be relatively easy but I am not 100% we should. Maybe with a custom in the future... >The original behavior of multiple presses of TAB is limited too: >its browsing is uni-directional, there is no way to use S-TAB >to scroll completions backwards. > >So I don't see how relying on TAB could improve navigation in completions. > >2. completion-set-suffix sometimes doesn't work; > I think it is fixed now. >3. commands that dispatch navigation keys from the minibuffer to the > *Completions* buffer: this doesn't cover other navigation keys. > >Maybe like windmove-default-keybindings defines modifiers, >a similar function could set up modifiers for scrolling completions >from the minibuffer, then the users could choose whether to use >e.g. 'M-' modifier for scrolling completions, or no modifier at all. > I will try that when have some time. >4. the feature of using completions-highlight-overlay often fails to > update highlighting when point is moved in the *Completions* buffer > by other navigation commands. > >To fix this, it could work like hl-line-mode, but instead of >highlighting the whole line, it could highlight only completions. > Done. I didn't use the post-command-hook before because I didn't know about it when I started and then I forgot to fix that. Please give it a try now. >Then completion highlighting would be useful on its own. >A new defcustom e.g. 'completion-highlight' (disabled by default) >could add a post-command-hook like hl-line-mode does. >Then other completion commands could enable this variable locally. I made this on the beginning, but I didn't want to add more code to simple.el... Maybe not a custom but a minor mode is better and simpler. It is just to divide my current code in two minor modes instead of just one. I will consider that...