Charles Cave <charles_c...@optusnet.com.au> wrote: > Is there a way to add a unique id into the headline assuming the existence > of an external comman/script to generate the number? > > I would like to include a cookie at the end of a headline that would allow > me to synchronise my org-mode contents with another application > (Listpro on Windows and Palm OS). The cookie would be like a priority > [Id 234] > > I was planning to store the next available id in a text file and have a python > script to generate the next available number, write to stdout, then increment > the stored value. >
I have more questions than answers: How does the cookie help with the synchronization? Is it just a matter of generating a unique ID or are there more requirements? If it *is* just a matter of generating a unique ID, maybe something like the following would do: (defun org-insert-heading-with-id () (interactive) (org-insert-heading) (save-excursion (insert (format " [Id: %s]" (org-id-new))))) The UUIDs that org-id-new generates are not pretty, but they are ready made, so you don't need external programs - but are they adequate? Is this anywhere near your requirements? Regards, Nick _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode