Skip to content

Better parsing of set_tags prompt #1097

@celsobenedetti

Description

@celsobenedetti

Describe the bug

Currently the tag parsing in the set_tags prompt editor does not handle invalid org characters, like spaces and hyphens.

This causes invalid tags to be created like my_tag or my tag.

checkhealth

==============================================================================
orgmode:                                                                    ✅

Orgmode ~
- ✅ OK Treesitter grammar installed (version 2.0.2)
- ✅ OK Setup called
- ✅ OK `org_agenda_files` configured
- ✅ OK `org_default_notes_file` configured

Steps to reproduce

  1. Go to heading or agenda, activate set tags: <leader>ot
  2. Write something like tag1 tag2 tag-with-hyphen

Result: :tag1 tag2 tag-with-hyphen:

Expected behavior

The above example should result in: :tag1:tag2:tag_with_hyphen:

Emacs functionality

The above example results in :tag1:tag2:tag:with:hyphen:.
Tested in Doom emacs.

Minimal init.lua

this does it:
https://github.com/nvim-orgmode/orgmode/blob/master/scripts/minimal_init.lua

Screenshots and recordings

No response

nvim-orgmode version

0e8cba3

OS / Distro

Linux 6.18.3-arch1-1

Neovim version/commit

0.11.5

Additional context

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions