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

David Bremner david at tethera.net
Fri Apr 24 04:12:01 PDT 2020


Ciprian Dorin Craciun <ciprian.craciun at gmail.com> 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.

d


More information about the notmuch mailing list