"\tignore A list (separated by ';') of file and directory names\n"
"\t that will not be searched for messages by \"notmuch new\".\n"
"\n"
"\tignore A list (separated by ';') of file and directory names\n"
"\t that will not be searched for messages by \"notmuch new\".\n"
"\n"
- "\t NOTE: *Every* file/directory that goes by one of those names will\n"
- "\t be ignored, independent of its depth/location in the mail store.\n";
+ "\t NOTE: *Every* file/directory that goes by one of those\n"
+ "\t names will be ignored, independent of its depth/location\n"
+ "\t in the mail store.\n";
notmuch_config_t *config = talloc (ctx, notmuch_config_t);
if (config == NULL) {
fprintf (stderr, "Out of memory.\n");
notmuch_config_t *config = talloc (ctx, notmuch_config_t);
if (config == NULL) {
fprintf (stderr, "Out of memory.\n");
config->database_path = NULL;
config->user_name = NULL;
config->user_primary_email = NULL;
config->database_path = NULL;
config->user_name = NULL;
config->user_primary_email = NULL;
- /* If the caller passed a non-NULL value for is_new_ret, then
- * the caller is prepared for a default configuration file in
- * the case of FILE NOT FOUND. Otherwise, any read failure is
- * an error.
+ /* If create_new is true, then the caller is prepared for a
+ * default configuration file in the case of FILE NOT
+ * FOUND. Otherwise, any read failure is an error.
const char *tags[] = { "deleted", "spam" };
notmuch_config_set_search_exclude_tags (config, tags, 2);
} else {
const char *tags[] = { "deleted", "spam" };
notmuch_config_set_search_exclude_tags (config, tags, 2);
} else {
/* Whenever we know of configuration sections that don't appear in
* the configuration file, we add some comments to help the user
* understand what can be done. */
/* Whenever we know of configuration sections that don't appear in
* the configuration file, we add some comments to help the user
* understand what can be done. */
g_key_file_set_comment (config->key_file, NULL, NULL,
toplevel_config_comment, NULL);
g_key_file_set_comment (config->key_file, NULL, NULL,
toplevel_config_comment, NULL);
g_key_file_set_comment (config->key_file, "database", NULL,
database_config_comment, NULL);
g_key_file_set_comment (config->key_file, "database", NULL,
database_config_comment, NULL);
g_key_file_set_comment (config->key_file, "new", NULL,
new_config_comment, NULL);
g_key_file_set_comment (config->key_file, "new", NULL,
new_config_comment, NULL);
g_key_file_set_comment (config->key_file, "user", NULL,
user_config_comment, NULL);
g_key_file_set_comment (config->key_file, "user", NULL,
user_config_comment, NULL);
g_key_file_set_comment (config->key_file, "maildir", NULL,
maildir_config_comment, NULL);
g_key_file_set_comment (config->key_file, "maildir", NULL,
maildir_config_comment, NULL);
g_key_file_set_comment (config->key_file, "search", NULL,
search_config_comment, NULL);
g_key_file_set_comment (config->key_file, "search", NULL,
search_config_comment, NULL);
static const char **
_config_get_list (notmuch_config_t *config,
const char *section, const char *key,
static const char **
_config_get_list (notmuch_config_t *config,
const char *section, const char *key,
if (strcmp(item, "database.path") == 0) {
printf ("%s\n", notmuch_config_get_database_path (config));
} else if (strcmp(item, "user.name") == 0) {
if (strcmp(item, "database.path") == 0) {
printf ("%s\n", notmuch_config_get_database_path (config));
} else if (strcmp(item, "user.name") == 0) {
-notmuch_config_command_set (void *ctx, char *item, int argc, char *argv[])
+notmuch_config_command_set (notmuch_config_t *config, char *item, int argc, char *argv[])
} else if (strcmp (argv[0], "set") == 0) {
if (argc < 2) {
fprintf (stderr, "Error: notmuch config set requires at least "
"one argument.\n");
return 1;
}
} else if (strcmp (argv[0], "set") == 0) {
if (argc < 2) {
fprintf (stderr, "Error: notmuch config set requires at least "
"one argument.\n");
return 1;
}
- return notmuch_config_command_set (ctx, argv[1], argc - 2, argv + 2);
+ return notmuch_config_command_set (config, argv[1], argc - 2, argv + 2);