From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Re: Insert PROPERTIES drawer after heading creation Date: Wed, 11 Mar 2020 21:32:30 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004c76b405a09a23f8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42971) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC820-000280-KC for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 16:32:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jC81z-0001L9-Ez for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 16:32:44 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:35124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jC81y-0001KJ-Bu for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 16:32:43 -0400 Received: by mail-wr1-x42a.google.com with SMTP id d5so4057843wrc.2 for ; Wed, 11 Mar 2020 13:32:42 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Lawrence Bottorff Cc: emacs-orgmode Mailinglist --0000000000004c76b405a09a23f8 Content-Type: text/plain; charset="UTF-8" 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 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 --0000000000004c76b405a09a23f8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Lawrence,
<= br>
On Wed,= Mar 11, 2020 at 7:56 PM Lawrence Bottorff <borgauf@gmail.com> wrote:
I read that too, but couldn'= t fathom what they meant. Still, I'm not sure what they mean by "p= refix argument."

The prefix argu= ment in this case is not so important as the OUTPUT-BUFFER argument, which = you were passing as =3Dt=3D:

"If OUTPUT-BUFFE= R is not a buffer and not nil, insert the output in current buffer after po= int leaving mark after it."=C2=A0

which is wh= y the output is inserted in the buffer.

And why does (shell-com= mand "uuidgen" t) produces two outputs? For other readers, this i= s 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
5= E69575E-2807-40BB-B1FE-10058D3C0666

(shell-command= "uuidgen" t)
243
A7FD662E-A752-4E02-B4E0-A3E= 48CC7E7AB

The "173" happens to app= ear at point position 173 in the buffer, and same for the 243 (you can veri= fy this with "C-u C-x =3D").

Hope this h= elps!

--Diego

--0000000000004c76b405a09a23f8--