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: Re: [QUESTION] Mouse click on an text-property object displayed as image not working Date: Thu, 14 Jan 2021 15:03:21 +0000 Message-ID: References: <8735z3g4bv.fsf@web.de> 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="13647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Help To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 16:32:25 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 1l04bp-0003QI-IR for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 16:32:25 +0100 Original-Received: from localhost ([::1]:34512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l04bo-0001pN-J5 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 10:32:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l04Zm-0001kX-63 for help-gnu-emacs@gnu.org; Thu, 14 Jan 2021 10:30:18 -0500 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:38049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l04Zh-0004ul-G4 for help-gnu-emacs@gnu.org; Thu, 14 Jan 2021 10:30:17 -0500 Original-Received: by mail-ed1-x52d.google.com with SMTP id b6so5656991edx.5 for ; Thu, 14 Jan 2021 07:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:reply-to:accept-language:content-language :mime-version; bh=KdiBGHnC/KRLN1ejt+pva4d/lPfVNq9aIBTUL4sKS4E=; b=OamaR8kgFP5vqUDXy7p4N+c7dbzMwcR7hecR+C1nReYkOEnSFyP2U91ejtj3PUVZTp fhPJxvAahDnk4sJjqUxslokW6e5yrnAnmrsypGWa45tfF04cP9FIK2yVsBwGdTq1+Ryp j5yAmVLQrfI4S3tHhQHwSMnd5S7ROvYOJX6c5VsRU/megozzS8jFrCSDoI8+YqCXW3QN VT4p9zgF+PnqJoQJzRQVTwNtMRhz6UXMyroq80RGrf6GnnyKBzvz83m56+JCt4Y/cCt7 FI2eRIThNPjZrOZy8ru5NHoCXZ/nTEE7aRPGvBP9YDPDif5/ikYJonk8v3fQvthn9NGX VMxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:reply-to:accept-language :content-language:mime-version; bh=KdiBGHnC/KRLN1ejt+pva4d/lPfVNq9aIBTUL4sKS4E=; b=IZCBtHNh81MiHt/r+aWG2nmjDrtsekuLAJXdoEEJsikTRk5rVS6EbS0OHnKQMh90pU uMuzLzv5p1i9ZcIHcjUkuAFh4g70JfNTZjwPCnXsssirsdJlP5FSVTzap/FGtwuIb4q0 T/fISY53nFxmGmhImX7t2mn4KVe0kiebS2TPGuXrM37iSEmfisNmEaN8eO5To98k9401 pbznBsytVCauVq7S9HNYF8L3pwCr1jgjZAmRwWXI4leDpkmNdC2u2TP41R4w/toQWP+X 7ZnV7idR0Ahdtiopq6OX6vzeomse/tt+zh8HJd5gPpkpZ1L6b2j7CgrzEXifXxIF2P+t vEQg== X-Gm-Message-State: AOAM531KFyoTj//w68BeYGY/KlHMobHg/Y5SKsaWjlp/yz/IZWSZsxXU Dd2OBYLabF7I+SxXFPaCp6DQXO5OsQ== X-Google-Smtp-Source: ABdhPJwewC8oYEPfqQCvYdpbA3jG6k7X3s9RDYtJ01gJ3fRtYKvWbA/4NzbhGHwQu27bBG/+O3/WLg== X-Received: by 2002:aa7:cf85:: with SMTP id z5mr6121752edx.274.1610638211890; Thu, 14 Jan 2021 07:30:11 -0800 (PST) Original-Received: from VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM ([2603:1026:300:5a::5]) by smtp.gmail.com with ESMTPSA id j5sm2274067edd.83.2021.01.14.07.30.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2021 07:30:10 -0800 (PST) Original-Received: from dark (183.246.145.17) by TYAPR03CA0014.apcprd03.prod.outlook.com (2603:1096:404:14::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.6 via Frontend Transport; Thu, 14 Jan 2021 15:03:16 +0000 Thread-Topic: [QUESTION] Mouse click on an text-property object displayed as image not working Thread-Index: AQHW6VVneNY3W5ZutEeHmAOE/FVcvaonOJQA X-MS-Exchange-MessageSentRepresentingType: 1 In-Reply-To: <8735z3g4bv.fsf@web.de> 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: 11614e42-399b-4d1e-6218-08d8b89d87f2 X-MS-Exchange-Organization-SCL: -1 X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-clientproxiedby: TYAPR03CA0014.apcprd03.prod.outlook.com (2603:1096:404:14::26) To VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:69::18) Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=numbchild@gmail.com; helo=mail-ed1-x52d.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:127241 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Michael Heerdegen writes: > Christopher Miles writes: > >> Here is my Emacs package https://github.com/stardiviner/org-link-beautify > > Without having looked at the code: is the reason of your problem that > the keymap character property at the location of the image points to > something like `image-map' instead of what you expect when you click > there (C-u C-x =3D should tell you)? > > Michael. Aha, I understand now. Because displaying as inline image, so text-property keymap not working. Thanks for hint. Here is the output of [C-u C-x =3D] #+begin_example position: 377333 of 458088 (82%), column: 0 character: [ (displayed as [) (codepoint 91, #o133, #x5b) charset: ascii (ASCII (ISO646 IRV)) code point in charset: 0x5B script: latin syntax: (] which means: open, matches ] category: .:Base, <:Not at eol, a:ASCII, l:Latin, r:Roman to input: type "C-x 8 RET 5b" or "C-x 8 RET LEFT SQUARE BRACKE= T" buffer code: #x5B file code: #x5B (encoded by coding system utf-8-unix) display: by this font (glyph code) ftcrhb:-PfEd-DejaVu Sans Mono-normal-normal-normal-*-24-*-*-*-m-0-iso10= 646-1 (#x3E) Character code properties: customize what to show name: LEFT SQUARE BRACKET old-name: OPENING SQUARE BRACKET general-category: Ps (Punctuation, Open) decomposition: (91) ('[') There are 2 overlays here: From 377333 to 377379 face hl-line priority -50 window # From 377333 to 377378 display [Show] face default keymap [Show] modification-hooks (org-display-inline-remove-overlay) org-image-overlay t There are text properties here: display [Show] font-lock-multiline t fontified t help-echo "LINK: file:Data/Books/mmexport1532255776028.jpg" htmlize-link (:uri "file:Data/Books/mmexport1532255776028.jpg") invisible org-link keymap [Show] mouse-face highlight type org-link-beautify #+end_example So I should define keymap on ~image-map~. But this is global. Is there any = other good solution to get around this adding keybinding on global map? Maybe make this ~image-map~ buffer locally? =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----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmAAXSIACgkQG13xyVro msNlkQgAp4OZ6HuYAESJ5eNROy+fqbX11QCL+3aHHite5NuflLzR8z33nUfthkxq 1c02533vJTyg2qFvsmokIZq39mCMy9pWBJV8Jo527U2HOHYtRPphB1gVY2KySbX0 1jmDrfbA33BtlvCE6lCJJzEwkXtp6pjyz3qHKjHWYauxOLtxdZ9bChXvUGgIUdE7 zk1GCi4Ya99nke+z6EK/WG91kityy/gcBDIw6s5Y/13QpRcXVQKrLadWv/QbydHL WKBHD1BaGLe1nxlcdZMYS0YrNH2mULzTPeXi8PMRrsLgDs9t78XJ9fU9bPvNckvg bkfo9AdaROmgX/sIVHRuCtim5MNV6g== =TLLR -----END PGP SIGNATURE----- --=-=-=--