Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent pre-processing of buffer if no valid Hugo subtree is found #589

Closed
kaushalmodi opened this issue Mar 15, 2022 · 0 comments · Fixed by #590
Closed

Prevent pre-processing of buffer if no valid Hugo subtree is found #589

kaushalmodi opened this issue Mar 15, 2022 · 0 comments · Fixed by #590
Labels

Comments

@kaushalmodi
Copy link
Owner

kaushalmodi commented Mar 15, 2022

Right now, the org-hugo--get-pre-processed-buffer function is called when (org-hugo-export-wim-to-md :all-subtrees) is called even if the Org file has no valid Hugo post subtrees.

Issue #587 is mainly seen by org-roam users who do not use subtree-based exports. Skipping the pre-processing step for file-based exports with prevent those broken link errors and probably make the exports a bit faster too as the pre-processing step will be skipped.

Running C-c C-e H H or C-c C-e H A in an Org file without post subtrees must not trigger the buffer pre-processing step. Right now, the latter does.

kaushalmodi added a commit that referenced this issue Mar 15, 2022
Fixes #589.

Add internal helper function
`org-hugo--buffer-has-valid-post-subtree-p`.

Clean up the `org-hugo-export-wim-to-md` docstring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant