]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.c
libify: Move library sources down into lib directory.
[notmuch] / notmuch.c
index b6fbef41b1e2738069a7d7964bc3d4592592be29..923a7cee53eb366cd91ee822ffb8c7678e157621 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -533,7 +533,7 @@ setup_command (unused (void *ctx), unused (int argc), unused (char *argv[]))
        free (default_path);
     }
 
        free (default_path);
     }
 
-    /* Coerce th directory into an absolute directory name. */
+    /* Coerce the directory into an absolute directory name. */
     if (*mail_directory != '/') {
        char *cwd, *absolute_mail_directory;
 
     if (*mail_directory != '/') {
        char *cwd, *absolute_mail_directory;
 
@@ -553,8 +553,6 @@ setup_command (unused (void *ctx), unused (int argc), unused (char *argv[]))
        free (cwd);
        free (mail_directory);
        mail_directory = absolute_mail_directory;
        free (cwd);
        free (mail_directory);
        mail_directory = absolute_mail_directory;
-
-       printf ("Abs: %s\n", mail_directory);
     }
 
     notmuch = notmuch_database_create (mail_directory);
     }
 
     notmuch = notmuch_database_create (mail_directory);
@@ -913,7 +911,6 @@ _get_one_line_summary (void *ctx, notmuch_message_t *message)
     const char *from;
     time_t date;
     const char *relative_date;
     const char *from;
     time_t date;
     const char *relative_date;
-    const char *subject;
     const char *tags;
 
     from = notmuch_message_get_header (message, "from");
     const char *tags;
 
     from = notmuch_message_get_header (message, "from");
@@ -921,12 +918,10 @@ _get_one_line_summary (void *ctx, notmuch_message_t *message)
     date = notmuch_message_get_date (message);
     relative_date = _format_relative_date (ctx, date);
 
     date = notmuch_message_get_date (message);
     relative_date = _format_relative_date (ctx, date);
 
-    subject = notmuch_message_get_header (message, "subject");
-
     tags = _get_tags_as_string (ctx, message);
 
     tags = _get_tags_as_string (ctx, message);
 
-    return talloc_asprintf (ctx, "%s (%s) %s (%s)",
-                           from, relative_date, subject, tags);
+    return talloc_asprintf (ctx, "%s (%s) (%s)",
+                           from, relative_date, tags);
 }
 
 static void
 }
 
 static void
@@ -1079,7 +1074,7 @@ show_command (void *ctx, unused (int argc), unused (char *argv[]))
     int ret = 0;
 
     const char *headers[] = {
     int ret = 0;
 
     const char *headers[] = {
-       "Subject", "From", "To", "Cc", "Bcc", "Date"
+       "From", "To", "Cc", "Bcc", "Date"
     };
     const char *name, *value;
     unsigned int i;
     };
     const char *name, *value;
     unsigned int i;
@@ -1118,6 +1113,8 @@ show_command (void *ctx, unused (int argc), unused (char *argv[]))
 
        printf ("%s\n", _get_one_line_summary (local, message));
 
 
        printf ("%s\n", _get_one_line_summary (local, message));
 
+       printf ("%s\n", notmuch_message_get_header (message, "subject"));
+
        for (i = 0; i < ARRAY_SIZE (headers); i++) {
            name = headers[i];
            value = notmuch_message_get_header (message, name);
        for (i = 0; i < ARRAY_SIZE (headers); i++) {
            name = headers[i];
            value = notmuch_message_get_header (message, name);
@@ -1467,9 +1464,11 @@ command_t commands[] = {
       "\t\tNote that the individual mail messages will be matched\n"
       "\t\tagainst the search terms, but the results will be the\n"
       "\t\tthreads containing the matched messages.\n\n"
       "\t\tNote that the individual mail messages will be matched\n"
       "\t\tagainst the search terms, but the results will be the\n"
       "\t\tthreads containing the matched messages.\n\n"
-      "\t\tCurrently, in addition to free text (and quoted phrases\n"
-      "\t\tthe following prefixed search terms are supported, (where\n"
-      "\t\t<brackets> indicate user-supplied values):\n\n"
+      "\t\tCurrently, in addition to free text (and quoted phrases)\n"
+      "\t\twhich match terms appearing anywhere within an email,\n"
+      "\t\tthe following prefixes can be used to search specific\n"
+      "\t\tportions of an email, (where <brackets> indicate user-\n"
+      "\t\tsupplied values):\n\n"
       "\t\t\tfrom:<name-or-address>\n"
       "\t\t\tto:<name-or-address>\n"
       "\t\t\tsubject:<word-or-quoted-phrase>\n"
       "\t\t\tfrom:<name-or-address>\n"
       "\t\t\tto:<name-or-address>\n"
       "\t\t\tsubject:<word-or-quoted-phrase>\n"