Skip to content

Fix org-roam-extract-subtree#2191

Merged
jethrokuan merged 2 commits intoorg-roam:mainfrom
ralfdoering:fix-export-subtree
May 12, 2022
Merged

Fix org-roam-extract-subtree#2191
jethrokuan merged 2 commits intoorg-roam:mainfrom
ralfdoering:fix-export-subtree

Conversation

@ralfdoering
Copy link
Copy Markdown
Contributor

Motivation for this change

Calling org-roam-extract-subtree fails with current head.

This PR contains two fixes, making it work again for me:

  • use cl-incf instead of incf
  • call (save-buffer) before promoting it.

Calling org-roam-extract-subtree failes with "Symbol’s function definition is void: incf"

org-roam.el includes cl-lib. org-roam--h1-count uses a bare incf call, which is undefined. Fix this by using cl-incf.
After fixing incf in 8ec2e59, org-roam-extract-subtree still fails. 

The error is now: org-roam-db--file-hash: Opening input file: No such file or directory,...

The buffer with the newly created content is still unsaved at this time, so save it before calling (org-roam-promote-entire-buffer)

Caveat is we now save the buffer two times, before and after promoting it.
@jethrokuan jethrokuan merged commit 2657f0b into org-roam:main May 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants