]> granicus.if.org Git - neomutt/commitdiff
add basic .muttrc variables
authorKarel Zak <kzak@redhat.com>
Wed, 14 Dec 2011 13:46:42 +0000 (14:46 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 14 Mar 2016 23:11:40 +0000 (23:11 +0000)
Signed-off-by: Karel Zak <kzak@redhat.com>
README.notmuch
globals.h
init.h

index 03905c0f9c3bea701d3cefb3609f5d750b8e16f1..24edd4dad749a44d84cd914353fa76062ef860dd 100644 (file)
@@ -42,16 +42,54 @@ notmuch support for mutt
       in your config files to keep things readable.
 
 
- * virtual mailboxes
+ * muttrc:
+
+   virtual-mailboxes <description> <uri> [ ...]
+
+      This command specifies one or more virtual folder. The folders are
+      accessioble by command 'X'.
+
+      example:
+
+      virtual-mailboxes "Linux Kernel" "notmuch:///whereis/db?query=tag:lkml&limit=1000" \
+                        "Filesystems"  "notmuch:///whereis/db?query=tag:fs" \
+                        "Music"        "notmuch:///another/db?query=tag:hard and tag:heavy"
+
+
+   notmuch_default_uri = <uri>
+
+      This variable specifies the default Notmuch database in format
+      notmuch://<absolute path>, the URI is used for notmuch queries (ESC+X) when
+      the current folder is not based on notmuch.
+
+   notmuch_hidden_tags = <comma delimited list>
+
+      This variable specifies private notmuch tags which should not be printed
+      on screen (index, pager).
+
+   notmuch_unread_tag = 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".
+
+   vfolder_format = <string>
+
+      This variable allows you to customize the file browser display for virtual
+      folders to your ** personal taste.  This string is similar to $$index_format,
+      but has its own set of printf(3)-like sequences:
+
+       %f  .dd folder name (description)
+       %n  .dd number of all messages
+       %N  .dd number of new messages
+       %>X .dd right justify the rest of the string and pad with character ``X''
+       %|X .dd pad to the end of the line with character ``X''
+       %*X .dd soft-fill with character ``X'' as pad
+
+      default is "%6n(%6N) %f "
+
 
-   .muttrc:
 
-     synopsis:
 
-      virtual-mailboxes <desciption> <uri> [ ...]
 
-     example:
 
-       virtual-mailboxes "Linux Kernel" "notmuch:///whereis/db?query=tag:lkml&limit=1000" \
-                         "Filesystems"  "notmuch:///whereis/db?query=tag:fs" \
-                         "Music"        "notmuch:///another/db?query=tag:hard and tag:heavy"
index d3460be2b254656014356980722a7721bbd8719a..e45fd12a46fdf35eab74ac2954bbaf191165b0e5 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -278,6 +278,12 @@ WHERE char *SmimeGetCertCommand;
 WHERE char *SmimeImportCertCommand;
 WHERE char *SmimeGetCertEmailCommand;
 
+#ifdef USE_NOTMUCH
+WHERE char *NotmuchDefaultUri;
+WHERE char *NotmuchUnreadTag;
+WHERE char *NotmuchHiddenTags;
+WHERE char *VirtFolderFormat;
+#endif
 
 
 
diff --git a/init.h b/init.h
index bbc115c71fdada02f29b66dcaa5fb498862d353f..11336ecef3bd0adbac412433f5fb4158715943d4 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1646,6 +1646,28 @@ struct option_t MuttVars[] = {
    ** .pp
    ** See also $$read_inc, $$write_inc and $$net_inc.
    */
+#endif
+#ifdef USE_NOTMUCH
+  { "notmuch_default_uri", DT_STR, R_NONE, UL &NotmuchDefaultUri, 0 },
+  /*
+   ** .pp
+   ** This variable specifies the default Notmuch database in format
+   ** notmuch://<absolute path>.
+   */
+
+  { "notmuch_hidden_tags", DT_STR, R_NONE, UL &NotmuchHiddenTags, UL "unread,draft,flagged,passed,replied,attachment" },
+  /*
+   ** .pp
+   ** This variable specifies private notmuch tags which should not be printed
+   ** on screen.
+   */
+  { "notmuch_unread_tag", DT_STR, R_NONE, UL &NotmuchUnreadTag, UL "tag:unread" },
+  /*
+   ** .pp
+   ** 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.
+   */
 #endif
   { "pager",           DT_PATH, R_NONE, UL &Pager, UL "builtin" },
   /*
@@ -3588,6 +3610,25 @@ struct option_t MuttVars[] = {
   ** Specifies the visual editor to invoke when the ``\fC~v\fP'' command is
   ** given in the built-in editor.
   */
+#ifdef USE_NOTMUCH
+  { "vfolder_format",  DT_STR,  R_INDEX, UL &VirtFolderFormat, UL " %6n(%6N) %f " },
+  /*
+  ** .pp
+  ** This variable allows you to customize the file browser display for virtual
+  ** folders to your ** personal taste.  This string is similar to $$index_format,
+  ** but has its own set of \fCprintf(3)\fP-like sequences:
+  ** .dl
+  ** .dt %f  .dd folder name (description)
+  ** .dt %n  .dd number of all messages
+  ** .dt %N  .dd number of new messages
+  ** .dt %>X .dd right justify the rest of the string and pad with character ``X''
+  ** .dt %|X .dd pad to the end of the line with character ``X''
+  ** .dt %*X .dd soft-fill with character ``X'' as pad
+  ** .de
+  ** .pp
+  ** For an explanation of ``soft-fill'', see the $$index_format documentation.
+  */
+#endif
   { "wait_key",                DT_BOOL, R_NONE, OPTWAITKEY, 1 },
   /*
   ** .pp