Skip to content

org-roam-promote-entire-buffer may relusts in lossing node #2242

@wztdream

Description

@wztdream

Description

if there is time stamp right under headline, org-roam-promote-entire-buffe will results in this time stamp at the first line, which results in org-roam loss this node, as it seems to me org-roam constrains that for a file node, the property drawer must be at the first line (BTW, does this a good idea?)

You may wander why set a timestamp right after headline, in my case if you change TODO status the time stamp will insert right after headline.

Steps to Reproduce

it is easy to reproduce:

  1. a simple foo node, with time stamp(generated by change todo status)
* DONE foo
CLOSED: [2022-07-26 二 01:52]
:PROPERTIES:
:ID:       7b09a745-6b34-4b6d-83a2-77372e079e10
:END:
:LOGBOOK:
- State "DONE"       from "TODO"       [2022-07-26 二 01:52]
:END:

  1. run org-roam-extract-subtree, which will output a file with following content:
CLOSED: [2022-07-26 二 01:52]
:PROPERTIES:
:ID:       7b09a745-6b34-4b6d-83a2-77372e079e10
:END:
#+title: foo
:LOGBOOK:
- State "DONE"       from "TODO"       [2022-07-26 二 01:52]
:END:

as you can see there is a timestamp at top line, in that case org-roam can not find this node

Expected Results

There are two options:

  1. the output should be
:PROPERTIES:
:ID:       7b09a745-6b34-4b6d-83a2-77372e079e10
:END:
#+title: foo
CLOSED: [2022-07-26 二 01:52]
:LOGBOOK:
- State "DONE"       from "TODO"       [2022-07-26 二 01:52]
:END:

  1. losse the constrain that property must at top line

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions