]> git.cworth.org Git - notmuch/blobdiff - notmuch.c
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / notmuch.c
index c75b0188e7dfc901d9822558135117c404b93bde..814b9e42a59f46ae675f24f688005ec22ab58914 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -531,7 +531,7 @@ main (int argc, char *argv[])
                }
 
                if (status == NOTMUCH_STATUS_NO_CONFIG)
                }
 
                if (status == NOTMUCH_STATUS_NO_CONFIG)
-                   fputs ("Try running 'notmuch setup' to create a configuration.", stderr);
+                   fputs ("Try running 'notmuch setup' to create a configuration.\n", stderr);
 
                return EXIT_FAILURE;
            }
 
                return EXIT_FAILURE;
            }
@@ -563,15 +563,16 @@ main (int argc, char *argv[])
                                               NULL,
                                               &notmuch,
                                               &status_string);
                                               NULL,
                                               &notmuch,
                                               &status_string);
-
-       if (status == NOTMUCH_STATUS_NO_CONFIG && ! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) {
-           fputs ("Try running 'notmuch setup' to create a configuration.", stderr);
-           goto DONE;
+       if (status_string) {
+           fputs (status_string, stderr);
+           free (status_string);
+           status_string = NULL;
        }
        }
+
        switch (status) {
        case NOTMUCH_STATUS_NO_CONFIG:
            if (! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) {
        switch (status) {
        case NOTMUCH_STATUS_NO_CONFIG:
            if (! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) {
-               fputs ("Try running 'notmuch setup' to create a configuration.", stderr);
+               fputs ("Try running 'notmuch setup' to create a configuration.\n", stderr);
                goto DONE;
            }
            break;
                goto DONE;
            }
            break;
@@ -589,6 +590,8 @@ main (int argc, char *argv[])
        case NOTMUCH_STATUS_SUCCESS:
            break;
        default:
        case NOTMUCH_STATUS_SUCCESS:
            break;
        default:
+           fputs ("Error: unable to load config file.\n", stderr);
+           ret = 1;
            goto DONE;
        }
 
            goto DONE;
        }