notmuch/lib
Louis Rilling a9b2135c75 tags_to_maildir_flags: Don't rename if no flags change
notmuch_message_tags_to_maildir_flags() unconditionally moves messages from
maildir directory "new/" to maildir directory "cur/", which makes messages lose
their "new" status in the MUA. However some users want to keep this "new"
status after, for instance, an auto-tagging of new messages.

However, as Austin mentioned and according to the maildir specification,
messages living in "new/" are not allowed to have flags, even if mutt allows it
to happen. For this reason, this patch prevents moving messages from "new/" to
"cur/", only if no flags have to be changed. It's hopefully enough to satisfy
mutt (and maybe other MUAs showing the "new" status) users checking the "new"
status.

Changelog:
* v2: Fix bool type as well as NULL returned despite having no errors (Austin
      Clements)
* v4: Tag the related test (contributed by Michal Sojka) as working

Signed-off-by: Louis Rilling <l.rilling@av7.net>

[Condition for keeping messages in new/ was extended to satisfy all
 tests from the previous patch. -Michal Sojka]

[Added by David Bremner, to keep the tests passing at each commit]

update insert tests for new maildir synchronization rules

As of id:1355952747-27350-4-git-send-email-sojkam1@fel.cvut.cz
we are more conservative about moving messages from ./new to ./cur.
This updates the insert tests to match
2013-09-03 20:41:51 -03:00
..
database-private.h lib: add date range query support 2012-10-31 16:55:32 -03:00
database.cc cli: Guard deprecated g_type_init calls 2013-06-08 20:42:33 -03:00
directory.cc lib: Perform the same transformation to _notmuch_database_find_directory_id 2012-05-23 22:30:32 -03:00
filenames.c lib: fix NULL checks for filenames iterators 2012-09-01 23:03:11 -03:00
gen-version-script.sh lib/gen-version-script.h: add getline and getdelim to notmuch.sym if needed 2011-09-05 07:44:14 -03:00
index.cc _notmuch_message_index_file: unref (free) address lists from gmime. 2012-12-24 19:02:22 -04:00
libsha1.c fix sum moar typos [comments in source code] 2011-06-23 15:58:39 -07:00
libsha1.h fix sum moar typos [comments in source code] 2011-06-23 15:58:39 -07:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local lib/Makefile.local: depend on libs we are linking with 2013-01-22 08:59:33 -04:00
message-file.c lib/message-file.c: use g_malloc () & g_free () in hash table values 2012-12-24 19:02:05 -04:00
message.cc tags_to_maildir_flags: Don't rename if no flags change 2013-09-03 20:41:51 -03:00
messages.c lib: Eliminate _notmuch_message_list_append 2013-02-18 20:20:38 -04:00
notmuch-private.h lib: fix clang build 2013-09-01 07:06:54 -03:00
notmuch.h lib: Document which strings are returned in UTF-8 2013-08-13 17:43:34 +02:00
parse-time-vrp.cc lib: add date range query support 2012-10-31 16:55:32 -03:00
parse-time-vrp.h lib: add date range query support 2012-10-31 16:55:32 -03:00
query.cc lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t 2013-06-24 22:53:16 -07:00
sha1.c Typsos 2009-11-18 03:21:36 -08:00
string-list.c Fixup string list author 2011-03-21 02:45:18 -04:00
tags.c lib: fix warnings when building with clang 2012-12-01 08:10:32 -04:00
thread.cc lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t 2013-06-24 22:53:16 -07:00