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: master 15ac51e0fd: Merge branch 'feature/completions-customs' Date: Tue, 22 Mar 2022 18:05:00 +0100 Message-ID: <20220322170500.ogpzw3lusul3l6cp@Ergus> References: <164793742180.2038.4306130819331318764@vcs2.savannah.gnu.org> <20220322082342.60DC3C051F4@vcs2.savannah.gnu.org> <87mthijpyc.fsf@yahoo.com> 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="2508"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Juri Linkov To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 22 18:08:55 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 1nWi07-0000T1-5L for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Mar 2022 18:08:55 +0100 Original-Received: from localhost ([::1]:42184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWi06-0001fW-0Q for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Mar 2022 13:08:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWhx8-00061j-E2 for emacs-devel@gnu.org; Tue, 22 Mar 2022 13:05:50 -0400 Original-Received: from sonic306-2.consmr.mail.bf2.yahoo.com ([74.6.132.41]:33672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWhx5-0003nW-Jk for emacs-devel@gnu.org; Tue, 22 Mar 2022 13:05:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1647968746; bh=yQGioRrZKVoJuxuVeUVJe9wquDTzhE7VlY+QuItNDLo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=OlBq/597cGvOHjjlvUtySECZOPkTrO/CATp/iEzHBDgnsfG+knYYaTlOUHzdd0r3Yjt91Ek5/Y7bpzT1E50w7IN7FTh+9wOpSh/sM2IHuY9l2JNIg4yzlb6caK6/0Cwlw6xQg5Tc2sxBUEmOe8cK4bpALRHK5TnmMQt0RsChEHgQMHEwPkMi/qOjP53h/xsYh0ADt1NbCtaYzepGnD/nVO2BUX0HsoxZ4pNfGFpZObXjALT+vmfehFZRTTzSNJHloh2zz+Sd7Fz8XwOHmznh13CgbmRh2M5OrmqvDhi73dRpgfOtEB4CUFlPLh7RtvI+FAaaHK2mFo8M9huP7LWGow== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1647968746; bh=netBeuCFAzHIdfbY18qcRbCQYNe7VpH/Vuwxfd5gwQb=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=GU67mVRtcn+NeKJ5fwze7GPv/BPCX4aTunxO+xtEHa2FDhGGW5YbZcXO3jACd1HcBj8VCS2f8fgQK4oDhyaBx2+DhRSX9NL4M9IRMeVB5OgA1xxtpplVfoAIOPFY7mV5fY0DVoSKQrrfMYw2OOm9Db/Zqf6CP4N4SL+4c7ZHCYvqqZlqCdYQsXej8umVA4XSF1PAyTD8uD4juhI89Nd+wWztx7a5o74x2AEU5RfhPP4Ch+lCZnZs4l+3xyIuq5GzBsrdp8jQmKdNP59RtWGPe5+7uDVlMx019LWrBJFzRHRclei4doL69xixc3K2nx638NQiR/x99N3zJArlCadw7A== X-YMail-OSG: aWHM3_kVM1n.s3Zzwj52QZSh2fcxt1Ybbq.OL.TJoOCiS34yrAQnyJW0ZdO96it OIVSkWmCdzbZxqgtwZ1nuBl5oVfK_RCzOvCUJGlmxGVtkeIK0jenJcCyFhKwfcu7EkL4MsNMnPy5 JatgOwmJO7FjeqXZ8VIqTl9XNCYSm9M46aydHCBeC8JaZVbM.QZQTI8wpgpktfJVqZ_fzC4QYYqb Ce6AIMtyNssfLksvhpRafcTQ7uR4PbA2OMbRaVhqaCCkaW2kaWb65KW5v7vFBtXJKKui8GUe1x.6 7DtUVmhQOFYk4HYox2rALTbF82GHgIQNf9T28COY8ibkBYsarFSc.7hzaduKNhu9771uRIpTAApG rBHTO_GbPmpG7IbNQ1q2LC2vtt5F1sSBJOVDgzktwsokP02hsW7WkM398DVHqz1rnTps8C7h1oDl uQCVJ56J1Ab0GlTXGPORNQOU149RCrrNN0FUMxk.6aE4pPbgbwlNInRhf3n3HfHb0tM1ilT4LTEm iukggAnZpV83UW6hCLtjn6zsmOWO87pBcbZ_L.oSz_DfBEhiktFNJMB79a9fzofDdkL5caQ4jieM 0SWc7cCR2TvBebA3K3GAGA0yJMEElKYJQleFfV0qW6BvcXtz4x_qDeOiFPWcW_kgxRsKOPihInZ6 pZ5GkJ8mz3MCK5NwUQzTRy1S2ZsHXqUULNskcTTBHNzsDUPgXZb2B8QxZADOyijn05oiSnnLzOlq jHJufu3aOxaeLyWfE2uq928_ZK8kiMdwTww1zW0tayxeKa8GoDECAxKXBgfGlaQyyLdd9sOGVOg1 f42C3v9EAxOr_KDEOtPkPXdqGY7JTpYCd8SSMTsps_ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Tue, 22 Mar 2022 17:05:46 +0000 Original-Received: by kubenode504.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID c51e54f6c17d020b2907580278bfdff8; Tue, 22 Mar 2022 17:05:39 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87mthijpyc.fsf@yahoo.com> X-Mailer: WebService/1.1.19894 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.132.41; envelope-from=spacibba@aol.com; helo=sonic306-2.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:287362 Archived-At: On Tue, Mar 22, 2022 at 05:28:59PM +0800, Po Lu wrote: >Juri Linkov writes: > >> +(defcustom completions-header-format >> + (propertize "%s possible completions:\n" >> + 'face 'shadow >> + :help "Please select a completion") >> + "Format of completions header. >> +It may contain one %s to show the total count of completions. >> +When nil, no header is shown." >> + :type '(choice (const :tag "No header" nil) >> + (string :tag "Header format string")) >> + :version "29.1") > >IHMO this should be off by default. It wastes a line of space in the >completions buffer for no real gain, and it's distracting. > The header was already there so no new space wasted... completion-show-help is nil in my system... I didn't add it to the modeline to make it simpler... BUT: we could add a completions-header-format special value 'modeline and then show there the count of completions... I am not interested at all because in my system y hide the mode-line for completions.... >Also, I don't know which part of this change causes the following >behavior, but if I say M-x and then press TAB twice, the item at the >start of the window displaying the completions buffer becomes >highlighted, even though it isn't selected. That should also be off by >default, since it's an unnecessary visual distraction. > Ok I think I know... I haven't observed this before... The completions-highlight-mode relies on the new cursor-face that shows the highlight when the cursor is over the text... It seems that when M-x according to completion--in-region-1 the second scrolls the Completions buffer, so the cursor goes to the start of the screen after the scroll, as there is a candidate, that's why you see it highlighted... I suggest two solutions here: 1) Not enable cursor-face-highlight-nonselected-window for completions... this will disable the highlight whenever the Completions window is not the active one... 2) Extend the highlight to consider cursor-in-non-selected-windows and set it to nil in Completions by default... The first is the simples one, but will fore the Juri's code to setq-local the variable in a hook or in his function wrapper... So just tell what do you prefer... >Thanks. >