emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Insert PROPERTIES drawer after heading creation


From: Diego Zamboni
Subject: Re: Insert PROPERTIES drawer after heading creation
Date: Wed, 11 Mar 2020 21:32:30 +0100

Hi Lawrence,

On Wed, Mar 11, 2020 at 7:56 PM Lawrence Bottorff <address@hidden> 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 as =t=:

"If OUTPUT-BUFFER is not a buffer and not nil, insert the output in current buffer after point leaving mark after it." 

which is why the output is inserted in the buffer.

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-871b681f3022

The first number is the return value of shell-command, which is (I think) the position in the buffer at which the pointer was when the function was evaluated (or something like this). Here's the output from two consecutive executions in my *scratch* buffer:

(shell-command "uuidgen" t)
173
5E69575E-2807-40BB-B1FE-10058D3C0666

(shell-command "uuidgen" t)
243
A7FD662E-A752-4E02-B4E0-A3E48CC7E7AB

The "173" happens to appear at point position 173 in the buffer, and same for the 243 (you can verify this with "C-u C-x =").

Hope this helps!

--Diego


reply via email to

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