Code snippet for OrgMode E05S02

This is the code for the OrgMode tutorial E05S02 video. I tried to put the elisp code for the Emacs initialization into the YouTube description, but I saw a note, that parenthesis is not allowed in the description. Ok, then I put it here and here we go:

The first code snippet is something I found on StackOverflow.

The purpose of this code is that it creates ID properties for every headline (if there isn’t one already) when you save your OrgMode file.

The next code snipped was made by myself. I have not much experience in Elisp programming, but Google turned out to be helpful and so I made this piece of code:

This function is bound to the F5 key. Whenever you press F5 then it takes the ID and copies it to the killring (aka Clipboard). If the headline has no ID property it creates one. In that way, you can easily create links to IDs because copying the ID is just one keystroke.

[ratings ]

2 Gedanken zu „Code snippet for OrgMode E05S02

  1. Pingback: OrgMode tutorial episode 5 | König von Haunstetten

  2. Much thanks for this, and for the idea itself. FWIW, I initially tried your tip with both pieces of code. But in practice, I don’t need all those properties and IDs for every item in my org life. But the way you have it, I can use only the second piece of code, and that generates the IDs on demand when needed. For my use, that’s perfect. Danke, Rainer

Kommentare sind geschlossen.