Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5c / 573733d6d9d576ded7ac073983e7336072571f
1 Return-Path: <jrollins@finestructure.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 077BB431FBC\r
6         for <notmuch@notmuchmail.org>; Tue, 26 Jan 2010 11:17:21 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -3.42\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-3.42 tagged_above=-999 required=5 tests=[AWL=0.579, \r
12         BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id UivT0fvFYaFA for <notmuch@notmuchmail.org>;\r
16         Tue, 26 Jan 2010 11:17:20 -0800 (PST)\r
17 Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6])\r
18         by olra.theworths.org (Postfix) with ESMTP id 5941C431FAE\r
19         for <notmuch@notmuchmail.org>; Tue, 26 Jan 2010 11:17:20 -0800 (PST)\r
20 Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com\r
21         [72.227.128.66])\r
22         (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)\r
23         by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o0QJHJ1K017546\r
24         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)\r
25         for <notmuch@notmuchmail.org>; Tue, 26 Jan 2010 14:17:19 -0500 (EST)\r
26 Received: from jrollins by servo.finestructure.net with local (Exim 4.71)\r
27         (envelope-from <jrollins@finestructure.net>) id 1NZqud-0000FL-6Y\r
28         for notmuch@notmuchmail.org; Tue, 26 Jan 2010 14:17:19 -0500\r
29 From: Jameson Rollins <jrollins@finestructure.net>\r
30 To: Notmuch Mail list <notmuch@notmuchmail.org>\r
31 Date: Tue, 26 Jan 2010 13:48:18 -0500\r
32 Message-ID: <87sk9sad6s.fsf@servo.finestructure.net>\r
33 MIME-Version: 1.0\r
34 Content-Type: multipart/signed; boundary="=-=-=";\r
35         micalg=pgp-sha256; protocol="application/pgp-signature"\r
36 X-No-Spam-Score: Local\r
37 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.6\r
38 Subject: [notmuch] [PATCH] simplify notmuch new output\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Tue, 26 Jan 2010 19:17:21 -0000\r
52 \r
53 --=-=-=\r
54 Content-Transfer-Encoding: quoted-printable\r
55 \r
56 This patch just simplifies the notmuch new output to make it easier to\r
57 read, as well as more easily machine parsable.\r
58 =2D--\r
59  notmuch-new.c |   31 ++++++++++++-------------------\r
60  1 files changed, 12 insertions(+), 19 deletions(-)\r
61 \r
62 diff --git a/notmuch-new.c b/notmuch-new.c\r
63 index f25c71f..e07107e 100644\r
64 =2D-- a/notmuch-new.c\r
65 +++ b/notmuch-new.c\r
66 @@ -816,41 +816,34 @@ notmuch_new_command (void *ctx, int argc, char *argv[=\r
67 ])\r
68                                     tv_now);\r
69 =20\r
70      if (add_files_state.processed_files) {\r
71 =2D     printf ("Processed %d %s in ", add_files_state.processed_files,\r
72 =2D             add_files_state.processed_files =3D=3D 1 ?\r
73 =2D             "file" : "total files");\r
74 +       printf ("processed: %d %s (",\r
75 +               add_files_state.processed_files,\r
76 +               add_files_state.processed_files =3D=3D 1 ? "file" : "files");\r
77         notmuch_time_print_formatted_seconds (elapsed);\r
78 +       printf (")");\r
79         if (elapsed > 1) {\r
80 =2D         printf (" (%d files/sec.).                 \n",\r
81 +           printf (" (%d files/sec.)\n",\r
82                     (int) (add_files_state.processed_files / elapsed));\r
83         } else {\r
84 =2D         printf (".                    \n");\r
85 +           printf ("\n");\r
86         }\r
87      }\r
88 =20\r
89      if (add_files_state.added_messages) {\r
90 =2D     printf ("Added %d new %s to the database.",\r
91 =2D             add_files_state.added_messages,\r
92 =2D             add_files_state.added_messages =3D=3D 1 ?\r
93 =2D             "message" : "messages");\r
94 =2D    } else {\r
95 =2D     printf ("No new mail.");\r
96 +       printf (" new: %d\n",\r
97 +               add_files_state.added_messages);\r
98      }\r
99 =20\r
100      if (removed_files) {\r
101 =2D     printf (" Removed %d %s.",\r
102 =2D             removed_files,\r
103 =2D             removed_files =3D=3D 1 ? "message" : "messages");\r
104 +       printf (" deletes: %d\n",\r
105 +               removed_files);\r
106      }\r
107 =20\r
108      if (renamed_files) {\r
109 =2D     printf (" Detected %d file %s.",\r
110 =2D             renamed_files,\r
111 =2D             renamed_files =3D=3D 1 ? "rename" : "renames");\r
112 +       printf (" renames: %d\n",\r
113 +               renamed_files);\r
114      }\r
115 =20\r
116 =2D    printf ("\n");\r
117 =2D\r
118      if (ret) {\r
119         printf ("\nNote: At least one error was encountered: %s\n",\r
120                 notmuch_status_to_string (ret));\r
121 =2D-=20\r
122 1.6.5\r
123 \r
124 --=-=-=\r
125 Content-Type: application/pgp-signature\r
126 \r
127 -----BEGIN PGP SIGNATURE-----\r
128 Version: GnuPG v1.4.10 (GNU/Linux)\r
129 \r
130 iQIcBAEBCAAGBQJLXz+7AAoJEO00zqvie6q8jjQP/0OHHKyY/imYsFs/peK24jLv\r
131 agUXZbbkHqjnfPVVhnb9uDuWKNvzhPpWIVdnban3v2YwAU/mp1uTkBwrlKwSJa8Q\r
132 jknJs9YDiS92mvqIVFy3QMm7kgGNTkJtsMIFEcYFLZboYSQeRR4SdX7HSRmsM/in\r
133 iwAp81ixYU+A6KCxGzUKwQQPUAH2+a0EEkXdzruKE4gDFSZiFQbNdbZRnNJMg/yi\r
134 S4AyXkFe04ouI30lZkSB4Jm1YfSdzd0OCV7GWiZ1J3g2o/eKPl6rXg3Npy8YLi0f\r
135 8UA+7H7r1F58CEUGdYld+VGqATUEQVDzsy1wTawoXpdvC2Vn0rjQES5EMFDOK9Kt\r
136 tzP96QJ/KazWKcYJTLFINkheUi2krdGwBbIGLekkfsGWBy8Y5MiKutrZa1ViWW1z\r
137 KDIDRgQhzh/48229g29+FIsKwd3bO6AAKmRwweW1tiVxTIaqNnilzqOUrlqa+FRD\r
138 PCfWIC5eKPKWVTFDSerOtLBK/0QwMDdXh1I+OMPBXsJmBYUJCeJKPOlkPTdTpDz9\r
139 9wa4I9sHSI7N905xiVaMfKzelxIhbTSnX/2chwNt8hx5vXVbkCrbARHjs6NME6HF\r
140 XKveIi9JsEFwaC0L2ymjZXPqIbXpa+dTA1RdVJbi3RzYdu6mFsRwLVaFWTfwyHhx\r
141 gp7QU6R9hD2HoXUrjwBf\r
142 =5IKW\r
143 -----END PGP SIGNATURE-----\r
144 --=-=-=--\r