emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with templates and ID in properties


From: Ihor Radchenko
Subject: Re: problems with templates and ID in properties
Date: Sat, 03 Feb 2024 21:52:45 +0000

Uwe Brauer <oub@mat.ucm.es> writes:

>> It might be changed. Currently, we mimic the behavior of
>> org-yank-subtree, so that we always insert captured entry under the
>> correct level regardless of the capture target. For example, when you
>> use OLP, the level will be adjusted.
>
>> May you please explain more why you need to use level 2 heading specifically?
>
> Sure. I use this template for extracting from emails sent by my students
> their names and email addresses to have entries like this
> --8<---------------cut here---------------start------------->8---
> * Grupos                                                           :noexport:
> ...
> ** !!TODO!! G1 <2023-01-24 12:51> :Annu24: Paul New
> ...
> #+TBLNAME: sheets
> #+BEGIN: columnview :maxlevel 2...
> ...
> That however only works if the entries have level **
>
> It my workflow now clearer?

Yup.
I recommend changing your capture template to
(file+olp "~/grupos2024.org" "Grupos")

>>> What command/variable could org-mode force to have always an UUID in the
>>> ID property?
>
>> `org-id-method' I think.
>
> This variable sets the format, but as far as I can see, is not
> reasonable for adding an ID.

Do you mean that you want IDs to be always added any time your create a
heading? If so, the common method is to add `org-insert-heading-hook'.

However, this hook will not work for templates. You may add
:ID: %(org-id-new)
to your template to generate an ID.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]