all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [QUESTION] Mouse click on an text-property object displayed as image not working
@ 2021-01-13  2:40 Christopher Miles
  2021-01-14 11:12 ` Michael Heerdegen
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Miles @ 2021-01-13  2:40 UTC (permalink / raw)
  To: Emacs Help

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]


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 object
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 "<mouse-1>") '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-beautify.el#L291

And here is background info of the user submitted issue, there is a gif showing this case.

https://github.com/stardiviner/org-link-beautify/issues/7

-- 
[ 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-16  4:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13  2:40 [QUESTION] Mouse click on an text-property object displayed as image not working Christopher Miles
2021-01-14 11:12 ` Michael Heerdegen
2021-01-14 15:03   ` Christopher Miles
2021-01-14 17:18     ` Michael Heerdegen
2021-01-16  4:35       ` [SOLVED] " Christopher Miles

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.