From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to implement mouse highlighing in tabulated list mode, just like for buttons? Date: Sat, 04 Feb 2023 21:01:02 +0200 Message-ID: <837cwxtfv5.fsf@gnu.org> References: <3a7d15dca834fe52fb6470c3564b7cd2.support1@rcdrun.com> <83ilghtl6w.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1315"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Jean Louis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 04 20:01:29 2023 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 1pONmz-0000BK-Nr for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Feb 2023 20:01:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pONmT-0000JA-Cy; Sat, 04 Feb 2023 14:00:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pONmS-0000J2-9u for emacs-devel@gnu.org; Sat, 04 Feb 2023 14:00:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pONmR-0001fQ-VG; Sat, 04 Feb 2023 14:00:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NgvMPhxqESVR9/XtFpIcpJV2tSKBpu9YCIPHjL8cQHs=; b=W5xxUL5gCYLE R50bt22JXaIzukc95Kj3EODWpU5AKhWz261rSeGrohzrzUMhAQ9i/EFWcYipwlBx1m25XMVUSAykb OjkkvIpAC27bKyOQ+4KGFeuzsrvrwH1Ki2XB1Jk1yaP5ce2Vf08zSY4mSszdKve447Z4vPgBzncrN i8wP8KufgIJqSsJGwMMYegenI4ppAyR7OYS61WJMn1+Metyq5Hc59st4TTFnF61prH73y+ERRiDSY z+jFAxc6khnbmS+Gl6Ku7JCaRQi/0WZshbdQSX1io4xtAMLc2n46KR+u7jvEYdI9EWd7rp9pSmLgs bCx8Kh2EvzistOPbFsRltg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pONmQ-000195-9E; Sat, 04 Feb 2023 14:00:54 -0500 In-Reply-To: (message from Jean Louis on Sat, 4 Feb 2023 21:47:07 +0300) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302980 Archived-At: > Date: Sat, 4 Feb 2023 21:47:07 +0300 > From: Jean Louis > Cc: emacs-devel@gnu.org > > (add-text-properties (line-beginning-position) (line-end-position) > '(mouse-face highlight)) > > Thank you. > > Is there any way to make something like this automatically? Maybe by > defining mouse face to have that property? What do you mean by "that property"? mouse-face is a text property, and 'highlight' is on of its possible values. I don't think we have a feature whereby an arbitrary text property can be put on every line of buffer text. > I wonder if it would slow down the listings in tabulated-list-mode. When the mouse-face has the value 'highlight', it is only shown when the mouse pointer is above the text with that property. Otherwise, the text is displayed normally.