Re: Insert PROPERTIES drawer after heading creation

2020-03-11 Thread Diego Zamboni
Hi Lawrence, On Wed, Mar 11, 2020 at 7:56 PM Lawrence Bottorff wrote: > I read that too, but couldn't fathom what they meant. Still, I'm not sure > what they mean by "prefix argument." > The prefix argument in this case is not so important as the OUTPUT-BUFFER argument, which you were passing a

Re: Insert PROPERTIES drawer after heading creation

2020-03-11 Thread Lawrence Bottorff
I read that too, but couldn't fathom what they meant. Still, I'm not sure what they mean by "prefix argument." And why does (shell-command "uuidgen" t) produces two outputs? For other readers, this is what they look like in *scratch* (shell-command "uuidgen" t) 2827 b5da7e0a-84c0-4db8-91f3-871b681

Re: Insert PROPERTIES drawer after heading creation

2020-03-11 Thread Diego Zamboni
On Wed, Mar 11, 2020 at 2:14 PM Lawrence Bottorff wrote: > Yes, thanks. That substring was a bad copy. Any insight why the > (shell-command "uuidgen" t) wasn't working? > I hadn't looked at it yet, but the documentation for =shell-command= gives the answer: Execute string COMMAND in inferior sh

Re: Insert PROPERTIES drawer after heading creation

2020-03-11 Thread Lawrence Bottorff
Yes, thanks. That substring was a bad copy. Any insight why the (shell-command "uuidgen" t) wasn't working? On Wed, Mar 11, 2020 at 3:03 AM Diego Zamboni wrote: > Hi LB, > > How about using the =org-id-uuid= function instead of shelling out to > uuidgen? In my quick test the following seems to b

Insert PROPERTIES drawer after heading creation

2020-03-10 Thread Lawrence Bottorff
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")))