Re: [O] org-element approach to modify or add ID to every headline

2015-08-14 Thread Samuel W. Flint
Grant Rettke writes: > On Sun, Aug 9, 2015 at 2:44 AM, Nicolas Goaziou > wrote: >> Anyway, the following should do: > > That works perfectly. Thank you. > > Tempted to run it in a on-save hook just to ensure that the document > *always* has IDs. At least for tangle comments. > You might try se

Re: [O] org-element approach to modify or add ID to every headline

2015-08-09 Thread Grant Rettke
On Sun, Aug 9, 2015 at 2:44 AM, Nicolas Goaziou wrote: > Anyway, the following should do: That works perfectly. Thank you. Tempted to run it in a on-save hook just to ensure that the document *always* has IDs. At least for tangle comments.

Re: [O] org-element approach to modify or add ID to every headline

2015-08-09 Thread Nicolas Goaziou
Hello, Grant Rettke writes: > Goal: > > 1) Visit every headline > 2) If there is an ID property >1) Then replace it's value with a UUID > 3) If there is not an ID property >1) Add an ID property and give it a UUID. > > `org-uuid' [provides] the functionality to add the ID with a UUID. >