From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Esben Stien <b0ef@esben-stien.name>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Insert UUID with org-insert-todo-heading
Date: Sun, 6 Apr 2014 19:39:06 -0400 [thread overview]
Message-ID: <CAJ51EToCihKKi93cT3YXqxOsKdkQJz62pXMDzbQ=taws+KFySg@mail.gmail.com> (raw)
In-Reply-To: <87a9byz5cx.fsf@quasar.esben-stien.name>
[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]
this kind of does what you want:
#+BEGIN_SRC emacs-lisp
(require 'org-id)
(add-hook 'org-insert-heading-hook
#'(lambda ()
(org-entry-put (point) "UUID" (org-id-uuid))))
#+END_SRC
at least it works if you use the menu to insert a new heading. it does not
work if you type the heading by hand.
org-insert-heading-hook
you can probably write a little function that sets a uuid property.
John
-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
On Sun, Apr 6, 2014 at 2:21 PM, Esben Stien <b0ef@esben-stien.name> wrote:
> I'm using the following to have a CREATED field in the PROPERTIES field
> of a TODO:
>
> ;; advice org-insert-todo-heading to insert a created timestamp using
> org-expiry
> (defadvice org-insert-todo-heading (after mrb/created-timestamp-advice
> activate)
> "Insert a CREATED property using org-expiry.el for TODO entries"
> (mrb/insert-created-timestamp)
> )
> (ad-activate 'org-insert-todo-heading)
>
> So, I get:
>
> **** TODO
> :PROPERTIES:
> :CREATED: [2014-04-06 sø. 20:11]
> :END:
>
> Is there any way to insert a UUID as well?, like:
>
> **** TODO
> :PROPERTIES:
> :CREATED: [2014-04-06 sø. 20:11]
> :UUID: 70f273b5-8bce-315f-6f31-6d9ec9a8b739
> :END:
>
> Any pointers as to how I can achieve this?
>
> --
> Esben Stien is b0ef@e s a
> http://www. s t n m
> irc://irc. b - i . e/%23contact
> sip:b0ef@ e e
> jid:b0ef@ n n
>
>
[-- Attachment #2: Type: text/html, Size: 2463 bytes --]
next prev parent reply other threads:[~2014-04-06 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-06 18:21 Insert UUID with org-insert-todo-heading Esben Stien
2014-04-06 23:39 ` John Kitchin [this message]
2014-04-07 15:22 ` Esben Stien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ51EToCihKKi93cT3YXqxOsKdkQJz62pXMDzbQ=taws+KFySg@mail.gmail.com' \
--to=jkitchin@andrew.cmu.edu \
--cc=b0ef@esben-stien.name \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.