[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get the right link using org-capture from the second level
From: |
Lukas C. Bossert |
Subject: |
How to get the right link using org-capture from the second level |
Date: |
Tue, 25 Jun 2024 20:31:22 +0200 |
User-agent: |
Mozilla Thunderbird |
Dear list,
In my org-roam setup, I want to document information about individuals.
To do this, I created an org file named `20230501233516-persons.org`,
which contains two top-level headings: `* Overview` and `* Persons`.
Under the `* Persons` heading, I intend to list all individuals. I've
created a template that allows me to add people from any other file
using e.g. `C-c n r i`. This template also facilitates the creation of
new person entries on the fly, and ideally, it should add a link to the
person entry in the file I am currently working in.
While the template functions as expected in creating new person entries,
the link generated points to the ID of the `20230501233516-persons.org`
file rather than the newly created person entry. How can I adjust my
template so that it correctly links to the new person's entry instead of
the ID of the `20230501233516-persons.org` file?
Here is my template:
```
(setq org-roam-capture-templates
'(("p" "person" entry
"** %^{Name|${title}}
:PROPERTIES:
:ID: %(org-id-uuid)
:AFFILIATION: %^{AFFILIATION}
:ROLE: %^{ROLE}
:PROJECT: %^{PROJECT}
:CAPTURED: %U
:END:\n%?"
:target (file+olp "20230501233516-persons.org" ("Persons"))
:unnarrowed 1
)
))
```
My system:
```
system MacOS 14.5 Darwin 23.5.0 arm64 mac
emacs 29.1 EMACSDIR=~/.config/emacs/
EMACS=/opt/homebrew/Cellar/emacs-mac/emacs-29.1-mac-10.0/Emacs.app/Contents/MacOS/Emacs
doom 3.0.0-pre PROFILE=_@0 HEAD -> master a99c6b90 2024-06-23
17:15:51 -0400
~/.config/doom/
Org mode version 9.8 (9.8-??-39272e216
```
Thanks, Lukas
(Note: I also asked this question on
https://emacs.stackexchange.com/questions/81591/how-to-get-the-right-link-using-org-capture-from-the-second-level)
- How to get the right link using org-capture from the second level,
Lukas C. Bossert <=