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

feat(tangle): add report_on_empty option in core.tangle #1250

Merged
merged 4 commits into from
Dec 28, 2023

Conversation

pysan3
Copy link
Contributor

@pysan3 pysan3 commented Dec 26, 2023

Do we need this warning?

utils.notify("Nothing to tangle!", vim.log.levels.WARN)

I run an autocmd for all norg files to automatically try tangling, and I don't want to get a warning everytime.

@pysan3

Changes

  • Add report_on_empty option.
module.config.public = {
    -- Notify when there is nothing to tangle (INFO) or when the content is empty (WARN).
    report_on_empty = true,
}

Notes

@vhyrro
Copy link
Member

vhyrro commented Dec 27, 2023

I sure love github's default commit messages. Either way the conflict should be resolved now properly. Could you double check if this is the case @pysan3? Afterwards we can merge it.

@pysan3
Copy link
Contributor Author

pysan3 commented Dec 28, 2023

@vhyrro As you can see, now the ci result is a ❌ due to these errors caused by the PR I mentioned.

image

Are they gonna be my fault now? Should I fix them in this PR?

@pysan3
Copy link
Contributor Author

pysan3 commented Dec 28, 2023

Doing some experiments, does the current v1 parser parse relative tags correctly in the first place?

I don't think this exports to the correct path (or doesn't do tangling in the first place?).

#tangle ../init.lua
@code lua
print("Hello world")
@end

Upward relative path does work when specified in the @document.meta tho.

@pysan3
Copy link
Contributor Author

pysan3 commented Dec 28, 2023

The above commit resolves the conflict and uses better mechanism to generate the output filepath without some complicated lua code like counting gmatch.

@vhyrro vhyrro merged commit cc6d8b1 into nvim-neorg:main Dec 28, 2023
2 checks passed
@vhyrro
Copy link
Member

vhyrro commented Dec 28, 2023

Fantastic, thanks a lot for all the work.

benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
…rg#1250)

Co-authored-by: vhyrro <76052559+vhyrro@users.noreply.github.com>
sahinf pushed a commit to sahinf/neorg that referenced this pull request May 15, 2024
…rg#1250)

Co-authored-by: vhyrro <76052559+vhyrro@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants