# Org-roam files expected structure / no node at point error

**URL:** <https://org-roam.discourse.group/t/org-roam-files-expected-structure-no-node-at-point-error/3723>\
**Category:** Troubleshooting\
**Created:** [January 13, 2025, 4:51pm UTC](https://org-roam.discourse.group/t/org-roam-files-expected-structure-no-node-at-point-error/3723 "2025-01-13T16:51:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![inkbottle](https://avatars.discourse-cdn.com/v4/letter/i/5e9695/32.png) [@inkbottle](https://org-roam.discourse.group/u/inkbottle)\
**Post date:** [January 13, 2025, 4:51pm UTC](https://org-roam.discourse.group/t/org-roam-files-expected-structure-no-node-at-point-error/3723/1 "2025-01-13T16:51:20Z")

</div>

Easy to reproduce error:

In an `org-roam` file, if I move the `#+title: cool title` line from after the property drawer containing the UUID to before that property drawer, and then evaluate `org-roam-tag-add`, I get a “no node at point” error.

Another case scenario:

I want to add `filetags` through a script that does not use `org-roam-tag-add`. I don’t recon that either [Org Syntax](https://orgmode.org/worg/org-syntax.html) or [Org Element API](https://orgmode.org/worg/dev/org-element-api.html) point to a specific structure or guidelines on where to place `#+filetags: cool_tag`: so I add it at the beginning of the file because no documentation (that I’ve found), tells me otherwise.

Then when I manually evaluate `org-roam-tag-add` I get a “no node at point” error.

---

<div class="post-metadata">

**Author:** ![akashp](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/akashp/32/1383_2.png) [@akashp](https://org-roam.discourse.group/u/akashp)\
**Post date:** [January 13, 2025, 7:12pm UTC](https://org-roam.discourse.group/t/org-roam-files-expected-structure-no-node-at-point-error/3723/2 "2025-01-13T19:12:54Z")

</div>

```auto
Properties can be inserted at the buffer level. 
That means they apply before the first headline and can be inherited by all entries in a file.
Property blocks defined before the first headline must be at the top of the buffer with only comments above them. 

```

I found the following in the org-mode manual :[Property Syntax (The Org Manual)](https://orgmode.org/manual/Property-Syntax.html#index-drawer_002c-for-properties)

There is a very specific syntax to where property drawers can be defined - both at the buffer level and at the headline level. Unless that syntax is followed things would go awry. 🙁

**Suggestion** :

You can use [#'org-roam-end-of-metadata](https://github.com/org-roam/org-roam/blob/425d53d56d0d338c781741df87824b1bfe7f88bc/org-roam-utils.el#L271) to programatically accomplish what you want to do, that is put cursor where the “metadata” ends. I think it would be much easier to accomplish this in elisp than for say in Bash script.

---

<div class="post-metadata">

**Author:** ![inkbottle](https://avatars.discourse-cdn.com/v4/letter/i/5e9695/32.png) [@inkbottle](https://org-roam.discourse.group/u/inkbottle)\
**Post date:** [January 13, 2025, 8:03pm UTC](https://org-roam.discourse.group/t/org-roam-files-expected-structure-no-node-at-point-error/3723/3 "2025-01-13T20:03:56Z")

</div>

Thanks, it is exactly what I was looking for.

> Property blocks defined before the first headline must be at the top of the buffer with only comments above them.

Also, as someone just pointed out to me, there is [Org Syntax](https://orgmode.org/worg/dev/org-syntax-edited.html#Zeroth_section), which gives the same answer:

> All elements before the first heading in a document lie in a special section called the _zeroth section_. It may be preceded by blank lines. Unlike a normal section, the zeroth section can immediately contain a [property drawer](https://orgmode.org/worg/dev/org-syntax-edited.html#Property_Drawers), optionally preceded by [comments](https://orgmode.org/worg/dev/org-syntax-edited.html#Comments).
