[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] IDs w/ human friendly component
From: |
John Kitchin |
Subject: |
Re: [O] IDs w/ human friendly component |
Date: |
Sun, 2 Feb 2014 12:47:49 -0500 |
you can put some kind of prefix on like this:
* intro to a section
:PROPERTIES:
:ID: intro-to-a:0f141497-f3ad-488a-b8c9-0a5c3ea53ba0
:END:
#+BEGIN_SRC emacs-lisp
(defun get-my-id ()
"create an org-id with prefix based on headline"
(let ((s))
(setq s
(replace-regexp-in-string
" " "-"
(nth 4 (org-heading-components))))
(org-id-get
(point)
t
(substring
s
0
(if (> (length s) 10) 10
(length s))))))
(get-my-id)
#+END_SRC
#+RESULTS:
: intro-to-a:0f141497-f3ad-488a-b8c9-0a5c3ea53ba0