Hi!

I'm using notmuch with maildir synchronization so I can also read my
mails on my phone using K9-Mail/Dovecot IMAP. This is all working pretty
nice but tags aren't visible.

Dovecot allows you to map 26 IMAP keywords to maildir flags (a..z) and
these keywords can be used in a search pattern for virtual mailboxes.

This change also allows you to customize (localize) the tags used.

I got a lot of help from a code agent (deepseek) as I'm not programming
in C/C++ very often, I thought a lot how this should be implemented and
the following idea's were mine:

- The configuration format (;/: separated)
- Using a static allocated, fixed sized maildir_flag_tags array
- Using a numbered index to maildir_flag_tags for tag2flag, sorted by
  tag name so bsearch can be used
- Lazy initialization of the index

I could never have found the problem of the segmentation fault in
notmuch-reply.c myself. This can be reproduced using Fedora 44 GCC.

Please take a look and let me know what can/should be improved.

Thanks in advance!

Dick Marinus (2):
  CLI/reply: use static const for reply_to_map
  lib/message: make maildir flags configurable

 contrib/python-legacy/notmuch/message.py      |  14 --
 doc/man1/notmuch-config.rst                   |  23 +--
 lib/config.cc                                 |   4 +
 lib/message.cc                                | 189 ++++++++++++++----
 lib/notmuch.h                                 |  26 +--
 notmuch-config.c                              |  14 +-
 notmuch-reply.c                               |   2 +-
 test/T030-config.sh                           |   1 +
 test/T055-path-config.sh                      |   2 +
 test/T590-libconfig.sh                        |  70 ++++---
 .../config-with-comments                      |  14 +-
 11 files changed, 225 insertions(+), 134 deletions(-)

-- 
2.54.0

_______________________________________________
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to