A recent feature request raised a new area of integration/customization for me. I've developed a package to browse GitHub content and we'd like to be able to store a link to the current 'thing' using org-store-link
(C-c C-l
). Problem is – it doesn't seem like I can change the behavior of the https?
protocol without completely replacing it.
At any given time, there are multiple things you might want to get the link for – and they'd all be https? links. How can I define multiple functions for a link type such that they can provide multiple options? Reading org-link-parameters
and org-store-link-functions
, this doesn't appear to be possible.
Pursuant to the comments below…
This is for proposed Magithub functionality. Magithub is a Magit-based GitHub client that can view issues, pull requests, and comments (among other things). You can choose to visit the current 'thing' in the browser using w
, though sometimes the current 'thing' is ambiguous. For example, if point is at a comment, it is also technically at an issue or PR. Point could even be at a link within a comment on an issue – and now there are three distinct link candidates for storing. Ideally, org-store-link
should at this point prompt for which link should be stored (which does appear to be possible per the results-alist
variable in the definition). The list of functions though comes from the return of org-store-link-functions
which collects over org-link-parameters
, so it seems it's not as simple as adding a function to a list.
When org-store-link
completes, I'm guessing org-stored-links
would just have a list ("some human-readable title I define" "https://github.com/some/project/issues/123")
added as an element.