===========
The **config** command can be used to get or set settings in the notmuch
-configuration file.
+configuration file and corresponding database.
+
+Items marked **[STORED IN DATABASE]** are only in the database. They
+should not be placed in the configuration file, and should be accessed
+programmatically as described in the SYNOPSIS above.
**get**
The value of the specified configuration item is printed to
**query.<name>**
+ **[STORED IN DATABASE]**
Expansion for named query called <name>. See
**notmuch-search-terms(7)** for more information about named
queries.
}
#define BUILT_WITH_PREFIX "built_with."
-#define QUERY_PREFIX "query."
+
+static bool
+_stored_in_db (const char *item)
+{
+ if (STRNCMP_LITERAL (item, "query.") == 0)
+ return true;
+ return false;
+}
static int
_print_db_config(notmuch_config_t *config, const char *name)
} else if (STRNCMP_LITERAL (item, BUILT_WITH_PREFIX) == 0) {
printf ("%s\n",
notmuch_built_with (item + strlen (BUILT_WITH_PREFIX)) ? "true" : "false");
- } else if (STRNCMP_LITERAL (item, QUERY_PREFIX) == 0) {
+ } else if (_stored_in_db (item)) {
return _print_db_config (config, item);
} else {
char **value;
return 1;
}
- if (STRNCMP_LITERAL (item, QUERY_PREFIX) == 0) {
+ if (_stored_in_db (item)) {
return _set_db_config (config, item, argc, argv);
}