I am trying to insert propertized text that is clickable like this:
(let ((buf (get-buffer-create "*test*"))) (with-current-buffer buf (read-only-mode -1) (erase-buffer) (org-mode) (insert (propertize "clickable" 'font-lock-face '(:foreground "red") 'keymap (let ((map (make-sparse-keymap))) (define-key map (kbd "<mouse-1>") (lambda () (interactive) (message-box "clicked"))) map) 'mouse-face 'highlight 'help-echo "Bad key, click to replace.")) (read-only-mode +1)) (display-buffer-in-side-window buf '((side . right))))
However, The keymap and mouse-face properties seem to be lost and I only see these properties:
There are text properties here: font-lock-face (:foreground "red") fontified t help-echo [Show] [back]
Am I missing some critical thing that causes these to be stripped out?