If i have a writable buffer, i can use this to insert hyperlink.
(require 'button)
(insert-button "foo" 'action (lambda (x) (find-file "~/test.py")))
But i have to add clickable text
property to a piece of text in read only buffer. I am trying this
(add-text-properties
1
50
'(lambda (x) (find-file "~/test.py")))
But it is throwing this error
Debugger entered--Lisp error: (error "Odd length text property list")
Any suggestion to solve this?