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 <di...@zzamboni.org> wrote:

>
> On Wed, Mar 11, 2020 at 2:14 PM Lawrence Bottorff <borg...@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
>
>

Reply via email to