Refactoring Planner annotation code

| emacs

Many planner files just contain code for creating hyperlinks from the
current buffer. This does not have anything to do with the idea of
planning, but simply makes planning information available from more
buffers.

If we separate this functionality from planner.el, we can make it
easier for people to play around with context-sensitive hyperlinking
without having to deal with planner’s complexity.

To make it easy for other people to play around with this, the
composition function needs to be flexible. Annotations should be
returned as (uri text) pairs, and a -composition-function can put the
two together in the appropriate format, escaping as necessary.
Highlighting will be provided in a separate file that defines a minor
mode that can be placed anywhere.

Other people’s code for creating annotations, then, would just involve
calling -get-uri, or -as-kill, or -to-string. We can use the hook
mechanism to get the appropriate annotations for the current buffer.
-core.el will provide a method for resolving links, and it should be
something that can be used as browse-url-browser-function.

planner code also specifies how to mark up links. If we’re moving the
annotation code into a layer that doesn’t know about publishing, what
will happen to the code? In that case, we will define URL
transformation functions in either emacs-wiki or planner. Yes, that
would work…

I need to think of a good name for it. uri.el? Yeah, that sounds okay.

You can comment with Disqus or you can e-mail me at sacha@sachachua.com.