CLOSED: [2021-01-23 Sat 14:52] :PROPERTIES: :ID: 2021-01-23-org-linker-edna :CREATED: [2021-01-23 Sat 09:16] :END: :LOGBOOK: - State "DONE" from "DONE" [2022-12-11 Sun 19:12] - State "DONE" from "DONE" [2021-11-21 Sun 15:01] - State "DONE" from "NEXT" [2021-01-23 Sat 14:52] :END: - Updates - 2021-11-21: reddit discussion on org-edna and visualization - 2022-12-11: EmacsConf22 talk video This is an article from a series of blog postings. Please do read [[id:2019-09-25-using-orgmode][my "Using Org Mode Features" (UOMF) series page]] for explanations on articles of this series. After [[id:2020-10-01-org-depend-to-edna][switching from the simple and built-in Org mode dependency method org-depend to the more powerful org-edna]], I had to accept the more complex dependency definition [[https://www.nongnu.org/org-edna-el/][syntax of org-edna]]. One of the most basic tasks here are: 1. Resolving the current heading should trigger a todo keyword for a remote heading. 2. Resolving the current heading should trigger a scheduled date for a remote heading. 3. Any heading that gets triggered by a remote heading should have a link to this dependency. This is where [[https://github.com/toshism/org-linker-edna][org-linker-edna]] is going to help you. It comes with a dependency on [[https://github.com/toshism/org-linker][org-linker]] as well as the =helm= framework. You can see [[https://github.com/novoid/dot-emacs/blob/master/config.org][in my Emacs configuration]] how I set up the packages. It also contains the definitions of all custom functions mentioned. This article was also part of the basis of [[https://emacsconf.org/2022/talks/orgsuperlinks/][my EmacsConf 22 9 minutes demo]] which can be also be found on various locations: - [[https://tube.graz.social/w/ktsimCvaYseDanQWBChn5J][tube.graz.social (PeerTube)]] - [[https://toobnix.org/w/ff1YxBEgR9LxJ51trJwyYk][toobnix.org (PeerTube)]] - [[https://www.youtube.com/watch?v=hRmswFHNbnk][YouTube]] *** Defining Dependencies With =org-linker-edna= set up with a =link-id-function= like my =my-id-get-or-generate=, defining dependencies and linking headings is very easy for me. Consider the following example: : *** TODO Set up org-linker : *** Set up org-linker-edna : *** Play around with org-linker-edna With my cursor on the first heading, I invoke my shortcut for =org-linker-edna= (=C-c s e=). This is the workflow that follows: 1. I get asked to enter a search term for a heading using the =helm= framework. I enter "org-linker-edna" which results in a finite set of search result candidates I choose from. 2. After confirming the heading of choice, I get asked what I would like to trigger in the remote heading: "scheduled", "deadline", or "todo". 3. For a single choice, you just have to move the cursor and confirm with =RET=. It is noteworthy that you can select multiple entries with =C-SPC=. I usually select "scheduled" as well as "todo". 4. For "scheduled" I now get asked to define the day. I always choose the very same day via =.= (a dot). Please note: at my side, the usage of weekdays like =+1wkdy= does not seem to work for some reason. 5. For "todo" I need to select the keyword. In my case, it is usually =NEXT=. Now, =org-linker-edna= does the following things for me: : *** TODO Set up org-linker : :PROPERTIES: : :ID: 2021-01-23-Set-up-org-linker : :TRIGGER: ids("id:2021-01-23-Set-up-org-linker-edna") todo!(NEXT) scheduled!(".") : :END: : : *** Set up org-linker-edna : :PROPERTIES: : :ID: 2021-01-23-Set-up-org-linker-edna : :BLOCKER: ids("id:2021-01-23-Set-up-org-linker") : :END: : : *** Play around with org-linker-edna As you can see, with =my-id-get-or-generate= I get human-readable IDs generated if there are no IDs which can be re-used. Since =org-edna= version 1.1.2 you can use "id:" links within the =ids()= properties. This gives you navigable links you can follow. The target heading automatically got a =BLOCKER= property which also contains a navigable link back to its dependency which closes the full circle. It is easy to see that =org-linker-edna= takes away error-prone effort when it comes to defining dependencies. Of course, you can define multiple dependencies within the same heading by repeating the workflow above several times. Resolving the first task to =DONE= results in the following situation: : *** DONE Set up org-linker : CLOSED: [2021-01-23 Sat 14:37] : :PROPERTIES: : :ID: 2021-01-23-Set-up-org-linker : :TRIGGER: ids("id:2021-01-23-Set-up-org-linker-edna") todo!(NEXT) scheduled!(".") : :END: : :LOGBOOK: : - State "DONE" from "NEXT" [2021-01-23 Sat 14:37] : :END: : : *** TODO Set up org-linker-edna : SCHEDULED: <2021-01-23 Sat> : :PROPERTIES: : :ID: 2021-01-23-Set-up-org-linker-edna : :BLOCKER: ids("id:2021-01-23-Set-up-org-linker") : :END: : : *** Play around with org-linker-edna *** Linking Headings For the sake of completeness, I again want to demonstrate the creation of a link from "Play around with org-linker-edna" to "Set up org-linker" as a reference. For this, I am using [[https://github.com/toshism/org-super-links][org-super-links]] as I already mentioned it in [[id:2020-07-11-org-super-links][this blog article]]. By invoking =sl-quick-insert-inline-link= (=C-c s i= in my setup), I get asked to search for a heading. When applied in the "Play around with org-linker-edna" heading of the example, it results in the following: : *** DONE Set up org-linker : CLOSED: [2021-01-23 Sat 14:43] : :PROPERTIES: : :ID: 2021-01-23-Set-up-org-linker : :TRIGGER: ids("id:2021-01-23-Set-up-org-linker-edna") todo!(NEXT) scheduled!(".") : :END: : :LOGBOOK: : - State "DONE" from "NEXT" [2021-01-23 Sat 14:43] : :END: : :LINKS: : [2021-01-23 Sat 14:33] <- [[id:2021-01-23-Play-around-with-org-linker-edna][Play around with org-linker-edna]] : :END: : : *** TODO Set up org-linker-edna : SCHEDULED: <2021-01-23 Sat> : :PROPERTIES: : :ID: 2021-01-23-Set-up-org-linker-edna : :BLOCKER: ids("id:2021-01-23-Set-up-org-linker") : :END: : : *** Play around with org-linker-edna : :PROPERTIES: : :ID: 2021-01-23-Play-around-with-org-linker-edna : :END: : : - This will be fun [[id:2021-01-23-Set-up-org-linker][Set up org-linker]] You can now observe that this results in an inserted link at the cursor as well as a back-link within a =LINKS= drawer in the referred heading. For me, this is the way of defining dependencies between tasks and links between any type of heading within Org mode. Furthermore, it is the reason why [[id:2020-06-14-Zettelkasten-concerns][I still struggle with the idea of introducing a Zettelkasten method]] in my situation. It just works with much less complexity and provides me a way of [[id:2018-08-25-deskop-metaphor][breaking up the strict hierarchy]] of Org mode headings. *** Update 2021-11-21: reddit discussion on org-edna and visualization :PROPERTIES: :END: [[https://www.reddit.com/r/emacs/comments/qyajk9/any_package_for_querying_or_visualizing_orgedna/][Please do read this page]] with a very interesting discussion by [[https://www.reddit.com/user/TeMPOraL_PL/][u/TeMPOraL\_PL]] on org-edna and task dependency with visualizations and a BLOCKER status.