]> granicus.if.org Git - neomutt/commitdiff
improve nm_unread_tag setting
authorKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2012 11:36:44 +0000 (12:36 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:30:05 +0000 (16:30 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
README.notmuch
init.h
mutt_notmuch.c

index cd7a1ee1dc2d51fd66f0fd474f1f84ad18cc7d08..c8c4c5c9b6843efd0312c7bd8de825b514adaaaa 100644 (file)
@@ -114,13 +114,13 @@ notmuch support for mutt
 
       Default is "unread,draft,flagged,passed,replied,attachment".
 
-   notmuch_unread_tag = tag:<name>
+   notmuch_unread_tag = <name>
 
       This variable specifies notmuch tag which is used for unread messages. The
       variable is used to count unread messages in DB only. All other mutt
       commands use standard (e.g. maildir) flags.
 
-      Default is "tag:unread".
+      Default is "unread".
 
    vfolder_format = <string>
 
diff --git a/init.h b/init.h
index e32c4c518e40853cf3efe561eb873a47c52b8d8b..485acd150c7d6b976d30a5a152d125006bef5f8f 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1682,7 +1682,7 @@ struct option_t MuttVars[] = {
    ** This variable specifies private notmuch tags which should not be printed
    ** on screen.
    */
-  { "nm_unread_tag", DT_STR, R_NONE, UL &NotmuchUnreadTag, UL "tag:unread" },
+  { "nm_unread_tag", DT_STR, R_NONE, UL &NotmuchUnreadTag, UL "unread" },
   /*
    ** .pp
    ** This variable specifies notmuch tag which is used for unread messages. The
index 84d9ca5fc382b6e913ce92810989f9ee50aa834d..2f21407745f4b548289448fd0d0059939261ba57 100644 (file)
@@ -886,14 +886,14 @@ int nm_get_count(char *path, unsigned *all, unsigned *new)
                        *new = all ? *all : count_query(db, db_query);
                else {
                        size_t qsz = strlen(db_query)
-                                       + sizeof(" and ")
+                                       + sizeof(" and tag:")
                                        + strlen(NotmuchUnreadTag);
                        char *qstr = safe_malloc(qsz + 10);
 
                        if (!qstr)
                                goto done;
 
-                       snprintf(qstr, qsz, "%s and %s", db_query, NotmuchUnreadTag);
+                       snprintf(qstr, qsz, "%s and tag:%s", db_query, NotmuchUnreadTag);
                        *new = count_query(db, qstr);
                        FREE(&qstr);
                }