Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(files): add method OrgHeadline:toggle_tag() #894

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

troiganto
Copy link
Contributor

Summary

This PR adds a method OrgHeadline:toggle_tag().

Right now, this simply moves the code of OrgMappings.toggle_archive_tag() into the OrgHeadline class. However, the org-attach module has a feature org_attach_auto_tag, that enables, disables and toggles the tag :ATTACH: when managing attachments. It's used all over the place. (1, 2, 3, 4, 5, 6, 7)

Related Issues

Extracted from #878

Changes

  • add method OrgHeadline:toggle_tag(tag: string, onoff?: boolean)
  • use it in OrgMappings:toggle_archive_tag()
  • add tests in headline_spec.lua

Checklist

I confirm that I have:

  • Followed the Conventional Commits specification (e.g., feat: add new feature, fix: correct bug, docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
  • Thoroughly tested my changes.
  • Added tests (if applicable) and verified existing tests pass with make test.
  • Checked for breaking changes and documented them, if any.

@troiganto
Copy link
Contributor Author

(Unrelated, but thanks for keeping up with this rapid pace of PRs! As a chronic procrastinator, I can imagine it's not easy 👏)

Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kristijanhusak kristijanhusak merged commit 09c1595 into nvim-orgmode:master Feb 7, 2025
6 checks passed
@troiganto troiganto deleted the feat/toggle-tag branch February 9, 2025 14:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants