From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Select completions from the minibuffer Date: Sun, 13 Mar 2022 19:47:11 +0200 Organization: LINKOV.NET Message-ID: <86bky9ah4o.fsf@mail.linkov.net> References: <86v8wlprc0.fsf@mail.linkov.net> <874k454n84.fsf@gnus.org> <86ilslmvql.fsf@mail.linkov.net> <87v8wl35wg.fsf@gnus.org> <20220312001446.y2feetylsfjynfao@Ergus> <87ilsj14qx.fsf@gnus.org> <83bkybm63u.fsf@gnu.org> <83a6dvm425.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17918"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , larsi@gnus.org, emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 13 19:14:56 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 1nTSk3-0004O5-U6 for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Mar 2022 19:14:55 +0100 Original-Received: from localhost ([::1]:43362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTSk2-0000eU-UE for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Mar 2022 14:14:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTSit-0007dF-91 for emacs-devel@gnu.org; Sun, 13 Mar 2022 14:13:43 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:58265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTSir-0001FU-JU; Sun, 13 Mar 2022 14:13:43 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A64B9FF804; Sun, 13 Mar 2022 18:13:37 +0000 (UTC) In-Reply-To: (Ergus's message of "Sat, 12 Mar 2022 20:30:35 +0100") Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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:287080 Archived-At: >>> >Isn't it very similar to the region? >>> >>> I don't think so... I think it is more similar to the mouse-face >>> feature / text property. >> >>Why do you think so? The region is redrawn when the cursor moves, and >>the cursor moves as result of Emacs commands, so how is this very >>different from what you want? By contrast, the mouse highlight is >>triggered by mouse movements that are completely independent of Emacs >>commands, and the implementation, as part of the display engine, is >>therefore quite complicated. Whereas the region display is nowadays >>implemented completely in Lisp. > > Ok, then it will be similar to the code I already have in > completions-highlight-mode. Essentially add/move an overlay on post > command hook based on some conditions. You could just add your function to the default value of pre-redisplay-functions, e.g. (defvar pre-redisplay-functions (list #'redisplay--update-region-highlight #'redisplay--update-mouse-face) where the new function 'redisplay--update-mouse-face' will activate the mouse-face when the cursor moves over the mouse-face property (only when an additional user option will be enabled).