emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: emacs-orgmode@gnu.org
Subject: Re: Force creation of org id in template
Date: Mon, 26 Oct 2020 22:33:36 +0100	[thread overview]
Message-ID: <87lffswu33.fsf@web.de> (raw)
In-Reply-To: 87pn54kcys.fsf@gmail.com

gusbrs.2016@gmail.com writes:

> Untested, but how about adding something like the following to your
> template?
>
> :PROPERTIES:
> :ID: %(org-id-new)
> :END:

I'm not sure.  I see that creating an id involves slightly more than
adding the property - see the `org-id-add-location' call in
`org-id-get'.  Calling the higher level `org-id-get' or the like in a
%() spec in a template fails however, since when it's called a temp
buffer not associated with a file is current.

And then I'm also not sure if the above is always secure when something
else in the template spec wants to add a (different) property.  Do you
know?

Thanks,

Michael.



  reply	other threads:[~2020-10-26 21:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 18:26 Force creation of org id in template Michael Heerdegen
2020-10-26 19:24 ` gusbrs.2016
2020-10-26 21:33   ` Michael Heerdegen [this message]
2020-10-26 22:40     ` Gustavo Barros
2020-10-26 23:30       ` Gustavo Barros
2020-10-27  6:12         ` Colin Baxter

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=87lffswu33.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --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).