emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Insert PROPERTIES drawer after heading creation


From: Lawrence Bottorff
Subject: Insert PROPERTIES drawer after heading creation
Date: Tue, 10 Mar 2020 23:39:04 -0500

I want to insert upon creating a heading a PROPERTIES drawer. So far I have this

(defadvice org-insert-heading (after add-id-stuff activate)
  (template-myid))

(defun template-myid ()
  (insert "\n:PROPERTIES:\n:TIME: "
      (substring (format "%s" (format-time-string "%Y-%m-%dT%H:%M:%S")))
      "\n:VERTEX: "
      (substring (format "%s" (shell-command "uuidgen" t)))
      "\n:EDGES:  \n:END:"))

This is working -- sort of. My problem is the uuid is getting thrown around. The output looks like this

* Heading
:PROPERTIES:
:TIME: 2020-03-10T23:34:17
:VERTEX: 12836
:EDGES:  
:END:32bf9499-f9e2-49d9-b8e7-9edb40272411

Not sure how to make this behave.

LB

reply via email to

[Prev in Thread] Current Thread [Next in Thread]