Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 077BB431FBC for ; Tue, 26 Jan 2010 11:17:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -3.42 X-Spam-Level: X-Spam-Status: No, score=-3.42 tagged_above=-999 required=5 tests=[AWL=0.579, BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UivT0fvFYaFA for ; Tue, 26 Jan 2010 11:17:20 -0800 (PST) Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6]) by olra.theworths.org (Postfix) with ESMTP id 5941C431FAE for ; Tue, 26 Jan 2010 11:17:20 -0800 (PST) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o0QJHJ1K017546 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 26 Jan 2010 14:17:19 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.71) (envelope-from ) id 1NZqud-0000FL-6Y for notmuch@notmuchmail.org; Tue, 26 Jan 2010 14:17:19 -0500 From: Jameson Rollins To: Notmuch Mail list Date: Tue, 26 Jan 2010 13:48:18 -0500 Message-ID: <87sk9sad6s.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.6 Subject: [notmuch] [PATCH] simplify notmuch new output X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 19:17:21 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable This patch just simplifies the notmuch new output to make it easier to read, as well as more easily machine parsable. =2D-- notmuch-new.c | 31 ++++++++++++------------------- 1 files changed, 12 insertions(+), 19 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index f25c71f..e07107e 100644 =2D-- a/notmuch-new.c +++ b/notmuch-new.c @@ -816,41 +816,34 @@ notmuch_new_command (void *ctx, int argc, char *argv[= ]) tv_now); =20 if (add_files_state.processed_files) { =2D printf ("Processed %d %s in ", add_files_state.processed_files, =2D add_files_state.processed_files =3D=3D 1 ? =2D "file" : "total files"); + printf ("processed: %d %s (", + add_files_state.processed_files, + add_files_state.processed_files =3D=3D 1 ? "file" : "files"); notmuch_time_print_formatted_seconds (elapsed); + printf (")"); if (elapsed > 1) { =2D printf (" (%d files/sec.). \n", + printf (" (%d files/sec.)\n", (int) (add_files_state.processed_files / elapsed)); } else { =2D printf (". \n"); + printf ("\n"); } } =20 if (add_files_state.added_messages) { =2D printf ("Added %d new %s to the database.", =2D add_files_state.added_messages, =2D add_files_state.added_messages =3D=3D 1 ? =2D "message" : "messages"); =2D } else { =2D printf ("No new mail."); + printf (" new: %d\n", + add_files_state.added_messages); } =20 if (removed_files) { =2D printf (" Removed %d %s.", =2D removed_files, =2D removed_files =3D=3D 1 ? "message" : "messages"); + printf (" deletes: %d\n", + removed_files); } =20 if (renamed_files) { =2D printf (" Detected %d file %s.", =2D renamed_files, =2D renamed_files =3D=3D 1 ? "rename" : "renames"); + printf (" renames: %d\n", + renamed_files); } =20 =2D printf ("\n"); =2D if (ret) { printf ("\nNote: At least one error was encountered: %s\n", notmuch_status_to_string (ret)); =2D-=20 1.6.5 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLXz+7AAoJEO00zqvie6q8jjQP/0OHHKyY/imYsFs/peK24jLv agUXZbbkHqjnfPVVhnb9uDuWKNvzhPpWIVdnban3v2YwAU/mp1uTkBwrlKwSJa8Q jknJs9YDiS92mvqIVFy3QMm7kgGNTkJtsMIFEcYFLZboYSQeRR4SdX7HSRmsM/in iwAp81ixYU+A6KCxGzUKwQQPUAH2+a0EEkXdzruKE4gDFSZiFQbNdbZRnNJMg/yi S4AyXkFe04ouI30lZkSB4Jm1YfSdzd0OCV7GWiZ1J3g2o/eKPl6rXg3Npy8YLi0f 8UA+7H7r1F58CEUGdYld+VGqATUEQVDzsy1wTawoXpdvC2Vn0rjQES5EMFDOK9Kt tzP96QJ/KazWKcYJTLFINkheUi2krdGwBbIGLekkfsGWBy8Y5MiKutrZa1ViWW1z KDIDRgQhzh/48229g29+FIsKwd3bO6AAKmRwweW1tiVxTIaqNnilzqOUrlqa+FRD PCfWIC5eKPKWVTFDSerOtLBK/0QwMDdXh1I+OMPBXsJmBYUJCeJKPOlkPTdTpDz9 9wa4I9sHSI7N905xiVaMfKzelxIhbTSnX/2chwNt8hx5vXVbkCrbARHjs6NME6HF XKveIi9JsEFwaC0L2ymjZXPqIbXpa+dTA1RdVJbi3RzYdu6mFsRwLVaFWTfwyHhx gp7QU6R9hD2HoXUrjwBf =5IKW -----END PGP SIGNATURE----- --=-=-=--