|From:||Mark E. Shoulson|
|Subject:||[O] Org-file "path"-type links|
|Date:||Thu, 25 Jul 2019 20:52:19 -0400|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0|
Hey. New to this list this time around... I've been tinkering with a custom link-type and I'm curious if anyone else is at all interested in it.
I use org-mode (among other things) to keep a sort of log or
daily journal at work. Things are entered in by date: I have "*
2019" as a top-level head, then "** 2019-07 July" and "***
2019-07-25 Þursday" (actually not exactly that since I use
odd-only mode, but not the point), and so forth. (Note that the
headlines are *not* date-links; the docs say that's a Bad Thing.)
My formatting is pretty free-form beyond that, and I don't always
remember to sub-head subjects below that, or I use plain lists or
whatever... also not the point. What matters is that sometimes I
*do* make proper sub-headings, and sometimes I may want to link to
them. I know I can make a link to [[*Best Firing Ever]] to link
to a particular headline, but often there are many headlines with
the same text, like "**** Weekly Shouting at Boss" or something,
and [[*Weekly Shouting at Boss]] won't necessarily link to the one
I want. I want the one that was under "2019-07-24 Wednesday" for
this link, and not any other. I don't know of any way that
org-mode has to distinguish such things (apart from "name the
headlines uniquely, moron," which to be sure is one way to do it),
so I have been making a "path"-type or "tree"-type link. So I can
have a hyperlink that links to [[tree:2019*2019-07 July*2019-07-24
Wednesday*Weekly Shouting at Boss][really told him off this time]]
and that links to *this* particular headline, following the tree
down link by link, separated by *'s. And you can also have a
filename, of course, like say
One Ever]] or something.
The code at this point works, including the store-link code (though adding it in overshadows the default store-link code for org-mode, which might be a problem), but it's still just a PoC, needs documentation, etc. And probably a better name; I have "tree:" as the keyword but it's probably awful... maybe something like "orglink:"? I know there's already a library by that name.
I'm just wondering if anyone else thinks this is a good idea. Maybe it's just for my unusual way of using org. There are other ways to do this, probably (maybe a "link-store" function that stores an ordinary org-mode link *and* also creates a unique target at the point?); this is what I did. If I put this up on github or elpa, would anyone else use it?
|[Prev in Thread]||Current Thread||[Next in Thread]|