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: Select completions from the minibuffer Date: Fri, 18 Mar 2022 12:16:08 +0100 Message-ID: <20220318111608.r54ospmr65ui7yoy@Ergus> References: <87ee3714li.fsf@gnus.org> <86r1773sb4.fsf@mail.linkov.net> <87pmmquew4.fsf@gnus.org> <86ee357wob.fsf@mail.linkov.net> <20220314090826.gyc42227jpvh4efa@Ergus> <86zglsiazs.fsf@mail.linkov.net> <20220317184701.ani7k3clp3impqwn@Ergus> <865yoc47d2.fsf@mail.linkov.net> <20220317231027.65clapwxz5qtnpm4@Ergus> <83bky3hizx.fsf@gnu.org> 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="4466"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 18 12:17:54 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 1nVAcE-00010e-35 for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Mar 2022 12:17:54 +0100 Original-Received: from localhost ([::1]:39588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVAcC-00007a-Mi for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Mar 2022 07:17:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVAbI-0007lm-Aj for emacs-devel@gnu.org; Fri, 18 Mar 2022 07:16:56 -0400 Original-Received: from sonic304-9.consmr.mail.bf2.yahoo.com ([74.6.128.32]:42210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVAbF-00054U-KG for emacs-devel@gnu.org; Fri, 18 Mar 2022 07:16:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1647602211; bh=hQdImeVB+BSdrZYHQWArpCESUoXXFwW4ceyAQuuPT78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=VIFRlzTg6ejYmqn0YDdfNqqnXQ+/VtoaSFjVrh02V/wPBYyMv8V3NxkVk/XmANuxRZwS2Le+npTrvi9icDECTC+6UEk4SPsWCYRaLZsQ7N/O01zzlMZofNr5df3eC0Cjg0MiseZ3v9uhpqU2twuyTnBDXycsl95PxJP04hxczKvnUbe7i9iF3JKPy4mJCH/ICI0ZhXkd+D7y1U4kwrirP4L3txruPyGF0pkskfelgmixdw9WPr+y14hgs3rDnoJkeZTh5VfFZ14BY9SfwbWavwye/jzuZjp8NSRdf2YX82uzT330kihUnJ4rvN6kw+MbQyqu4tUdCWu2atqixtOCRg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1647602211; bh=gkrN7BFx+BKOwBB3X9bn9eCisySZR8hRXBErJId8xSY=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=DhnHWC3CiEBvKK3/pgmHeUXgKRMYdLbgumo/iLDTqU959rVUhlVnmTcZlGN5au4h6XR1BrUol7FdOC5DcjhiJmUmC8votgy9r8pQ8RaoT2vzuZ0i6+6WDlNp+w4R0RUDZ/jqKYhvsZr3dMN4dtsx7H8TXVI/w/tVKFzVGqPYvjfvtNwTWXGhQephaJYmqnlHzPrZ+aiIGi/mNyGUh0ETu1iFaEt6Quyh/iiWCIxIV13gaK10HK0Z7A232q82gzRlw4EQZmYVLkpTiySxjZFg4vf0YiK0gHQB42o9e4PC/ooU2Q2sRoxzR67lx4qKOFlRzb3ZB0E5hQ2Oz0FwjDCs+Q== X-YMail-OSG: yAuWw08VM1nXB_eVqmi9DEWY8JXBEbxijLoI5DBlbwgV4SpiH4C4E7oMCdLSBwN 03JnnvRhdVt0xwvB7Gb2HsJH9dCIQAuqAcsMLm9Deec.Wp5bwvO4d1pe7NAWhi7cXGADb_uE5EHp HfH9tMGd.GlnqRNdu59_zQpiC4_qxtb7t7_UElKkvmn3OInGbak6LaV.zvz5kb5ClmbqGTQM6j6p ZEaNwlpGkhsAUo6aZCCW7WwfTH8Au4Bxk.3tCk07pUqrpYyyTHiAF9oBghflrtZ_1lqjsTU69iCM _0AakZUrWFRJbXQonC7GU6NbPoLK_fWgDXEzczr91BDEE5RjY2.lgpcABcmp6XIRKZDkrK2PI422 SjCES7ywHjtKrWCFcspz5GvKS.pf4wytB91oEkGCenaQG0JZthc739LrQ2jz3O_rSzWbXgwu94sF x1DgnxgmtCSSQhbJ3vsGlDNTXNE6m0Ppt5Pf3wO22Z9KtT.S4l5dpLBH5AcC2wEnmCqqwE5kN0xv Gr5z009r5TvngVcEjHXkz32OIgmQ9EoIfHtUQqbzRm59kJsC95_i55AaiOLsDK9RpeorNBb_wAIz borJme3Zd9JO51BFKidWBqiMiiQrLOy31jnCpe_vRtDovyLSz5.MCqucx3cTs5usVe1scw23jgOJ uhXTEvVYcvyAuxaWb95q8A80uuV4edFIsKE1uA6zUrHVm8aLVO7O0S.J_.XQh_VXTcOgFrJ_EGrV DK264KXLAvzHQzJWdluVXW3fnbY6SBe07o7ZFzGn61RsDEMqy92alZFv5kSjkt._nwibZHVmtiCO eLDKJM7hXAXXZxLjMMaeU.2vaayQgd5VLSbSG7HVbu X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Fri, 18 Mar 2022 11:16:51 +0000 Original-Received: by kubenode518.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 747eaf5af98ac3be70439fff56e4ee9f; Fri, 18 Mar 2022 11:16:47 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83bky3hizx.fsf@gnu.org> 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.128.32; envelope-from=spacibba@aol.com; helo=sonic304-9.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:287273 Archived-At: On Fri, Mar 18, 2022 at 08:28:34AM +0200, Eli Zaretskii wrote: >> Date: Fri, 18 Mar 2022 00:10:27 +0100 >> From: Ergus >> Cc: Lars Ingebrigtsen , emacs-devel@gnu.org >> >> Yes I just confirmed, actually the pre-redisplay-function is not called >> for simple commands like self-insert or moving the point and in your >> case neither. > >If that's the case, how come the region's display is updated when you >insert a character or move point (with Shift pressed)? > Hi Eli: Maybe I expressed a bit incorrectly, sorry. When moving point redisplay--pre-redisplay-functions is called BUT receives nil in the list of windows to update, so it goes in the first part of the if and runs the hooks for the selected-window only. (actually this code looks like a workaround for that situation) (if (null windows) (with-current-buffer (window-buffer (selected-window)) (run-hook-with-args 'pre-redisplay-functions (selected-window))) (dolist (win (if (listp windows) windows (window-list-1 nil nil t))) (with-current-buffer (window-buffer win) (run-hook-with-args 'pre-redisplay-functions win)))) In Juri's code it is moving the point in completions while in the minibuffer so *Completions* never becomes the active window and it is never passed to redisplay--pre-redisplay-functions. When we force (redisplay--update-cursor-face-highlight) then *Completions* is passed to redisplay--pre-redisplay-functions, maybe because an overlay moved or because of the set-window-parameter call... I am not really sure about how the windows list is filled to call pre-redisplay-function. Does it makes sense? Best, Ergus