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 16:37:35 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009b36ff05a096048a" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58783) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC3Qb-0004bp-VK for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 11:37:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jC3Qa-0005fB-UI for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 11:37:49 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:33656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jC3Qa-0005Wj-5R for emacs-orgmode@gnu.org; Wed, 11 Mar 2020 11:37:48 -0400 Received: by mail-wm1-x331.google.com with SMTP id r7so3445709wmg.0 for ; Wed, 11 Mar 2020 08:37:47 -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 --0000000000009b36ff05a096048a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =3Dshell-command=3D gi= ves the answer: Execute string COMMAND in inferior shell; display output, if any. With prefix argument, *insert the COMMAND=E2=80=99s output at point*. So this function does not return a string that can be concatenated with others, it actually inserts the output in the buffer, so it's not guaranteed it will land where you need it. To have the output of the command returned as a string, I think you should use =3Dshell-command-to-string=3D. --Diego --0000000000009b36ff05a096048a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Mar 1= 1, 2020 at 2:14 PM Lawrence Bottorff <borgauf@gmail.com> 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 ye= t, but the documentation for =3Dshell-command=3D gives the answer:

Exe= cute string COMMAND in inferior shell; display output, if any.
<= /div>
With prefix= argument, insert the COMMAND=E2=80=99s output at point.
=

So this function does not return a str= ing that can be concatenated with others, it actually inserts the output in= the buffer, so it's not guaranteed it will land where you need it.

To have the output of the command returned as a strin= g, I think you should use =3Dshell-command-to-string=3D.

--Diego

--0000000000009b36ff05a096048a--