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

How to use the notmuch command <modify-labels> to tag emails with tags containing spaces? #4302

Open
Spacecortez opened this issue May 12, 2024 · 0 comments
Labels

Comments

@Spacecortez
Copy link

Spacecortez commented May 12, 2024

I have recently migrated to neomutt from gmail, and have a lot of emails with a nested tag hierarchy.

These tags are things like:

@1-PROJECTS/Buy a car
@1-PROJECTS/Get Neomutt Emails Working
@2-AREAS/Health
@2-AREAS/Holidays and Travel

etc...

I have worked out a lua script that can generate virtual mailboxes for each of these tags dynamically, but when I try to tag my emails with <modify-labels> I'm unable to ADD (or remove) tags that have spaces in them.

Instead it will add a tag for each set of characters delimited by spaces, with the command

:<modify-labels>@2-AREAS/Holidays and Travel

adding the three tags:

@2-AREAS/Holidays
and
Travel

If I use the command

:<modify-labels>"@2-AREAS/Holidays and Travel"

It adds the three tags:

"@2-AREAS/Holidays
and
Travel"

Notmuch's documentations for the tag command says that spaces in tags should be encoded as %20, e.g.

notmuch tag +@2-AREAS/Holidays%20and%20Travel <search-terms>

But neomutt's <modify-labels> command doesn't work when I do this, as it adds a tag that literally contains "%20" where I want spaces.

Is it possible, with neomutt's <modify-labels> command, to add tags with spaces in them?

@Spacecortez Spacecortez added the type:question Question label May 12, 2024
@Spacecortez Spacecortez changed the title How to use the notmuch function <modify-labels> to tag emails with tags containing spaces? How to use the notmuch command <modify-labels> to tag emails with tags containing spaces? May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant