From: Lawrence Bottorff <borgauf@gmail.com>
To: Diego Zamboni <diego@zzamboni.org>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: Insert PROPERTIES drawer after heading creation
Date: Wed, 11 Mar 2020 13:56:11 -0500 [thread overview]
Message-ID: <CAFAhFSUKFtgMwfhF4x_5pmUOvvJkSwWxcwfzVhfijEhJvp3TcA@mail.gmail.com> (raw)
In-Reply-To: <CAGY83EfgewDfCLOWKgr8HM38As+-FKvyWmQWG-J4Gs+1NHyizw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]
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-871b681f3022
(org-id-uuid)
"0bb7a4e1-9fc2-4428-b8de-a2d9ef5c56ab"
Also, does anyone know how I could have done this by "advise"-ing a
function in org-mode tempo templates? I could never figure out what
function was actually handling the <...-TAB.
On Wed, Mar 11, 2020 at 10:37 AM Diego Zamboni <diego@zzamboni.org> wrote:
>
> On Wed, Mar 11, 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 yet, but the documentation for =shell-command= gives
> the answer:
>
> Execute string COMMAND in inferior shell; display output, if any.
> With prefix argument, *insert the COMMAND’s 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 =shell-command-to-string=.
>
> --Diego
>
>
[-- Attachment #2: Type: text/html, Size: 3000 bytes --]
next prev parent reply other threads:[~2020-03-11 18:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 4:39 Insert PROPERTIES drawer after heading creation Lawrence Bottorff
[not found] ` <CAGY83EdJyQeFWu3zjZtnXos_10WExAzJi7wOS7rxk84W7MonqA@mail.gmail.com>
2020-03-11 13:14 ` Lawrence Bottorff
2020-03-11 15:37 ` Diego Zamboni
2020-03-11 18:56 ` Lawrence Bottorff [this message]
2020-03-11 20:32 ` Diego Zamboni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFAhFSUKFtgMwfhF4x_5pmUOvvJkSwWxcwfzVhfijEhJvp3TcA@mail.gmail.com \
--to=borgauf@gmail.com \
--cc=diego@zzamboni.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).