is found as returned by 'notmuch config get database.path' command. Note that
the <path> should NOT include .notmuch directory name.
- If the "<path>" is not defined then $nm_default_uri is used, for example:
+ If the "<path>" is not defined then $nm_default_uri or $folder is used,
+ for example:
set nm_default_uri = "notmuch:///home/foo/maildir"
virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox"
nm_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://<absolute path>, the URI is used for notmuch queries (ESC+X) when the
+ current folder is not based on notmuch. If the default URI is not specified
+ then mutt will try to use $folder variable (see mutt manual for more details).
nm_hidden_tags = <comma delimited list>
return NULL;
db_filename = data->db_filename ? data->db_filename : NotmuchDefaultUri;
+ if (!db_filename)
+ db_filename = Maildir;
if (!db_filename)
return NULL;
if (strncmp(db_filename, "notmuch://", 10) == 0)
get_db_filename(data), buf);
else if (NotmuchDefaultUri)
snprintf(uri, sizeof(uri), "%s?query=%s", NotmuchDefaultUri, buf);
+ else if (Maildir)
+ snprintf(uri, sizeof(uri), "notmuch://%s?query=%s", Maildir, buf);
else
return NULL;
if (!db_query)
goto done;
- if (!db_filename && NotmuchDefaultUri) {
- if (strncmp(NotmuchDefaultUri, "notmuch://", 10) == 0)
- db_filename = NotmuchDefaultUri + 10;
- else
- db_filename = NotmuchDefaultUri;
+
+ if (!db_filename) {
+ if (NotmuchDefaultUri) {
+ if (strncmp(NotmuchDefaultUri, "notmuch://", 10) == 0)
+ db_filename = NotmuchDefaultUri + 10;
+ else
+ db_filename = NotmuchDefaultUri;
+ } else if (Maildir)
+ db_filename = Maildir;
dflt = 1;
}