# Creating and capturing nonexistant nodes

**URL:** https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423
**Category:** Troubleshooting
**Created:** [April 8, 2024, 3:31am UTC](https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423 "2024-04-08T03:31:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![angel](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@angel](https://org-roam.discourse.group/u/angel)
#### Post date: [April 8, 2024, 3:31am UTC](https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423/1 "2024-04-08T03:31:32Z")

</div>

hey, I’m pretty new to emacs, but I really like org-roam so far.

Something I wanna have though is the ability to make fake links to nonexistent  
nodes I know I wanna make but don’t wanna capture just yet into a template and  
interrupt my writing.

Org-roam-ui already seems to detect when I manually put in `[[id:fake node]]`  
with empty nodes showing up in the web ui.

I even made my own function to make my fake node for me:

[https://paste.sr.ht/~acsqdotme/3c83a5d01bb6d295b8a937e43bca7267768e4bb8](https://paste.sr.ht/~acsqdotme/3c83a5d01bb6d295b8a937e43bca7267768e4bb8)

And I found someone on github wanting to replicate a similar workflow to me,  
and jethro made them a hook to capture those fake nodes at point when running  
org-open-at-point:

> <https://github.com/org-roam/org-roam/issues/2034#issuecomment-1013947870>
>
> \### Brief Abstract
> 
> When following a \`\[\[roam:Node name\]\]\` link to a nonexisten…t node, org-roam will automatically open a capture buffer with title "Node name". It would be great if the same could happen with links of type \`\[\[id:Node name\]\]\` where that ID doesn't exist.
> 
> \### Long Description
> Org-roam-ui allows to show placeholder nodes for \`\[\[id:Node name\]\]\` type links, and it even allows one to right-click such a node and capture a new node with title "Node name". However, mouse and click is not very much the Emacs way, and it is inconvenient to have to move to org-roam-ui in order to create new notes from placeholder nodes. It would be much more convenient to simply follow the link in Emacs and it would open a capture buffer with the "fake ID" as the note title. 
> 
> This would be great for my workflow because I could simply "quick-bracket" a term to follow up with a note later, and it would show up as a placeholder note on my graph, without cluttering my org-roam folder with a bunch of empty notes with a \`:placeholder:\` tag, as I do now.
> 
> \### Proposed Implementation (if any)
> N/A
> 
> \### Please check the following:
> 
> \- \[✔ \] No similar feature requests (unless I missed something)

But when I run C-c C-o on that link and capture it, it doesn’t update the id: I  
made to the generated ID, so it stays `[[id:fake node][FAKE NODE]]` instead of  
becoming `[[id:137fe61e-9b8f-4fac-a3b3-945d41721d4a][FAKE NODE]]`

So my main question is with the given hook, is it possible to make a  
fake-node-insert func that updates the ID automatically when captured?

Secondly and much less importantly, is there a better system than all caps to  
visually signify a link goes to nowhere? dokuwiki red links are what I’m very  
used to.

thanks for reading.

---

<div class="post-metadata">

### Author: ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)
#### Post date: [April 9, 2024, 6:37am UTC](https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423/2 "2024-04-09T06:37:27Z")

</div>

How about using `[[roam:<Title>]]` links for this purpose?

You can use completion-at-point (such as Corfu and Company – below I use Corfu).  
 ![image](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/5/55d07fba25156a58c734836a81ade26b1e5bc999.png)

With it:

1. On save, if the title exists as a node in your `org-roam-directory`, the whole link automatically changes to the normal ID link.

2. On save, If it does not exist, it will remain as `roam:` link.

3. As you can change the face of the roam like this (as shown in the screen capture):

```auto
    (org-link-set-parameters "roam" :follow #'org-roam-link-follow-link :face 'nobreak-space)

```

1. When you follow the `roam:` link, you get a capture process.

---

<div class="post-metadata">

### Author: ![angel](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@angel](https://org-roam.discourse.group/u/angel)
#### Post date: [April 10, 2024, 2:02am UTC](https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423/3 "2024-04-10T02:02:35Z")

</div>

This is great! The one thing I had to change was remove the `:follow` directive as C-c C-o’ing on the link didn’t work at all till I removed it.

Saving is also a bit finicky when I refile, but I’m sure I can fix that myself with a more thorough refile hook. Thanks for the help, @nobiot.

---

<div class="post-metadata">

### Author: ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)
#### Post date: [April 10, 2024, 12:23pm UTC](https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423/4 "2024-04-10T12:23:00Z")

</div>

Glad it works for you 🙂

> [@angel](#):
>
> The one thing I had to change was remove the `:follow` directive as C-c C-o’ing on the link didn’t work at all till I removed it.

This is unexpected because `:follow` part is [what org-roam does by default](https://github.com/org-roam/org-roam/blob/main/org-roam-node.el#L727). Perhaps this could be an indication that you might have customization that conflicts with this part?

You might like to check user option `org-roam-link-auto-replace` – I think it needs to be t (it should be, by default).

---

<div class="post-metadata">

### Author: ![angel](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@angel](https://org-roam.discourse.group/u/angel)
#### Post date: [April 10, 2024, 2:14pm UTC](https://org-roam.discourse.group/t/creating-and-capturing-nonexistant-nodes/3423/5 "2024-04-10T14:14:27Z")

</div>

It now works now with the `:follow` property as well. I saw the default line in the org-roam repo, and I was confused too.

Removing it worked then, and it still works now (probably cause it doesn’t get overridden from the default?).

I cut down a lot on some global config options regarding functions, so there must’ve been one that broke it when I tried to override the property.
