From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mark E. Shoulson" Subject: Org-file "path"-type links Date: Thu, 25 Jul 2019 20:52:19 -0400 Message-ID: <191cf8e2-2658-8003-b726-76dc6479a9c3@kli.org> Mime-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59834) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqoT7-0002yG-5s for emacs-orgmode@gnu.org; Thu, 25 Jul 2019 20:52:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqoT6-00034Y-3A for emacs-orgmode@gnu.org; Thu, 25 Jul 2019 20:52:21 -0400 Received: from pi.meson.org ([96.56.207.26]:57562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hqoT5-00034A-US for emacs-orgmode@gnu.org; Thu, 25 Jul 2019 20:52:20 -0400 Received: from nagas.meson.org (nagas [192.168.2.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pi.meson.org (Postfix) with ESMTPS id 2A874220044 for ; Thu, 25 Jul 2019 20:52:19 -0400 (EDT) Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org"

Hey.=C2=A0 New to this list this time around... I've been tinkerin= g 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.=C2=A0 Things are entered in by date: I have = "* 2019" as a top-level head, then "** 2019-07 July" and "*** 2019-07-25 =C3=9Eursday" (actually not exactly that since I use odd-only mode, but not the point), and so forth.=C2=A0 (Note that t= he headlines are *not* date-links; the docs say that's a Bad Thing.)=C2= =A0 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.=C2=A0 What matters is that sometime= s I *do* make proper sub-headings, and sometimes I may want to link to them.=C2=A0 I know I can make a link to [[*Best Firing Ever]] to li= nk 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.=C2=A0 I want the one that was under "2019-07-24 Wednesday" = for this link, and not any other.=C2=A0 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.=C2=A0 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.=C2=A0 And you can also have a filename, of course, like say [[tree:/home/me/bestofjournal.org::Successes*Solitaire Games*Best 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.=C2=A0 And probably a better name; I have "tree:" as the keyword but it's probably awful... maybe something like "orglink:"?=C2=A0 I know there's already a library by that nam= e.


I'm just wondering if anyone else thinks this is a good idea.=C2=A0 Maybe it's just for my unusual way of using org.=C2=A0 There are ot= her 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.=C2=A0 If I put this up o= n github or elpa, would anyone else use it?


~mark