I often need to keep track of conversations that happen in Slack, so I wrote a small elisp package that retrieves all message info (channel, timestamps, message(s)) for a given Slack permalink.
Then I convert the data to org-element using
Now, I need to find a way to either override
org-insert-link so whenever I want to insert a link and it happens to match a pattern, it would not insert link as is, but extracts Slack data using my method and inserts that instead.
What's the best way of doing something like this?