From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Miles Newsgroups: gmane.emacs.help Subject: [QUESTION] Mouse click on an text-property object displayed as image not working Date: Wed, 13 Jan 2021 02:40:07 +0000 Message-ID: Reply-To: Christopher Miles Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2622"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs Help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 13 04:09:41 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1kzWXU-0000Za-TU for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 13 Jan 2021 04:09:40 +0100 Original-Received: from localhost ([::1]:42212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzWXT-0001NN-TS for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 22:09:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzWX1-0001ME-UD for help-gnu-emacs@gnu.org; Tue, 12 Jan 2021 22:09:11 -0500 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:42868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzWX0-0000oK-2h for help-gnu-emacs@gnu.org; Tue, 12 Jan 2021 22:09:11 -0500 Original-Received: by mail-ed1-x52a.google.com with SMTP id g24so307693edw.9 for ; Tue, 12 Jan 2021 19:09:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:thread-topic:thread-index:date:message-id:reply-to :accept-language:content-language:mime-version; bh=RJe+nWkndgIQaYq3C+LkvIS/iSovtvSsILAA+qO6zN4=; b=X36bTs03eNKO34GXYZ4wqGdKx3t2HwZvqdgF3+vqfPj0Z0MY2Hp6U4Wa8t9kY9C1yw iY4yR+KG7VM0tyHj3SnBzsDeAaKg8+B2h+bO9uJRRPtAcHpZQ1B0EZh0pat4mOXwe6d6 8LvIZp0GTJkdJQ6lk9wnRmZw+RtKi4s/23/hHWutBQXUCgVdMVTtGSKidBzdB1Ec/ffN wkmuWhmLqb4eq/WIk3J9DwR8sADXndG2Dnu+wEEDI/BK8Fa4Z+LJ7rXEUbankStT4uOJ rUNUYHE1TLwY/C5rDqonEYnGKZ9PEznm7NaljOQKcSKi0c7eFqnDvwFendGuOrRDZSYP Tf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:thread-topic:thread-index:date :message-id:reply-to:accept-language:content-language:mime-version; bh=RJe+nWkndgIQaYq3C+LkvIS/iSovtvSsILAA+qO6zN4=; b=k76QGMH5LOf7Koo+G12G0CfoolZHyWJL0uVs8qrX9Hc7y4J/Vdin9YZsF6TfLhL+X0 XapQnmQ1zb9Hj0xQIgeLBHXYEJvH/kYqp94NLaaZ6gGT4fBKth4r6T1qj/BfIizn5cm1 9T3450TH4WS2TOdD3WfHW1ZETaXg1wJiVekihPMXOWJCYkrpwQLfiWP1H8PzrAtOjDrd ocE1zClsXtJlKFR+sR/eLKDe8s55tCN6R0yjjU9sdBO4luHMyMoPW+Wl94QxufGCLow8 hnO1ELE17Dox1NijkhxpOuaJq4Jkl8uhBlvNVAyC2aefrwtiD0HpGa6UBn4I/D6l8Sbb DCPg== X-Gm-Message-State: AOAM532Ua1V6BmA4Js7ELP46EQh8iRaCdnLKVlDkn+qdhG3UJoG40yg0 Uwc/pZnsDEnIRlLTcVn7EfPRXSbR7Q== X-Google-Smtp-Source: ABdhPJw+uQYOPTOJFBLmh3y9iR+h3tpu5JHni4PKWMUPPLVPaU5W5enhQwMXF2eH41L8Ua3GRvj8pA== X-Received: by 2002:aa7:ca55:: with SMTP id j21mr104596edt.172.1610507347440; Tue, 12 Jan 2021 19:09:07 -0800 (PST) Original-Received: from VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM ([2603:1026:300:5a::5]) by smtp.gmail.com with ESMTPSA id oq7sm153495ejb.63.2021.01.12.19.09.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2021 19:09:06 -0800 (PST) Original-Received: from dark (183.246.145.17) by TYXPR01CA0048.jpnprd01.prod.outlook.com (2603:1096:403:a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Wed, 13 Jan 2021 02:40:05 +0000 Thread-Topic: [QUESTION] Mouse click on an text-property object displayed as image not working Thread-Index: AQHW6VVneNY3W5ZutEeHmAOE/FVcvQ== X-MS-Exchange-MessageSentRepresentingType: 1 Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Exchange-Organization-AuthAs: Internal X-MS-Exchange-Organization-AuthMechanism: 06 X-MS-Exchange-Organization-AuthSource: VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM X-MS-Has-Attach: yes X-MS-Exchange-Organization-Network-Message-Id: 52a9d04e-a753-403c-6050-08d8b76c89c8 X-MS-Exchange-Organization-SCL: -1 X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-clientproxiedby: TYXPR01CA0048.jpnprd01.prod.outlook.com (2603:1096:403:a::18) To VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:69::18) Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=numbchild@gmail.com; helo=mail-ed1-x52a.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127219 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Here is my Emacs package https://github.com/stardiviner/org-link-beautify I got an problem on defining keybinding mouse left click on text-property o= bject which is display as image. The following code can't work when click on the preview image. But it works fine if the text-property object is not image. #+begin_src emacs-lisp (defun org-link-beautify--add-keymap (start end) "Add keymap on link text-property. between START and END." (put-text-property start end 'keymap org-link-beautify-keymap)) (define-key org-link-beautify-keymap (kbd "RET") 'org-open-at-point) (define-key org-link-beautify-keymap [mouse-1] 'org-open-at-point) (define-key org-link-beautify-keymap (kbd "") 'org-open-at-point) #+end_src The code of displaying image in text-property is here: https://github.com/stardiviner/org-link-beautify/blob/master/org-link-beaut= ify.el#L291 And here is background info of the user submitted issue, there is a gif sho= wing this case. https://github.com/stardiviner/org-link-beautify/issues/7 =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl/+XXgACgkQG13xyVro msOVMAf/WCWxpky5hXCdWR+9OThJ31FjMeZXyfGQCX50znIjgap3neDW6Uu/LJVs xCll3qvfEQX30GX+T9IeI/a8xjXRrrSueahWXUw2TlKMISRxucii28MV+VNKTCEs R1SRLqI4OKquvF8r8NaBDCGOEJu8GRZ4Dzhy0g/3gwm5zVsssau+XV51bdJvJGTy gLAWCPXd8fVGSd2GLlcTVMj5OQX+ENWQdqc7vB8GfmfecEfWTWpw5zc8W/R5XNwZ DOoe0rZg0L9Dk0lTlaZxasY9q79HSVaNb3cG8rZTD7otu+8b0XLjUJKS+ycaOEiM hCs79dY+YtPuxz+jqoJTDJtRhK7vDA== =9YZL -----END PGP SIGNATURE----- --=-=-=--