Re: Strip spaces in `tags` in `~/.notmuch-config` (and other fields)

Subject: Re: Strip spaces in `tags` in `~/.notmuch-config` (and other fields)

Date: Fri, 24 Apr 2020 08:12:01 -0300

To: Ciprian Dorin Craciun,


From: David Bremner

Ciprian Dorin Craciun <> writes:
> I've tried to manually edit my `~/.notmuch-config`, and I've seen that
> the field `tags` was written as `tags=unread;inbox;`.  In order to
> increase readability I've decided to update my configuration file by
> adding spaces around `=` and `;` as in `tags = unread ; inbox ;`.
> Everything worked without a warning, until it didn't...  :)
> What happened:  all my emails are now tagged with `unread ` and `
> inbox `;  (i.e. whitespace in tags).

Digging into the code a bit, the culprit seems to be _config_get_list.
It is a bit surprising that the glib function g_key_file_get_string_list
isn't a bit friendlier here (or at least better documented), but I guess
the output of it needs to be postprocessed.

notmuch mailing list