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 C8E7A431E64 for ; Mon, 30 Jan 2012 01:16:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 Z6MjTOqkvwnj for ; Mon, 30 Jan 2012 01:16:33 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3F7F3431FBC for ; Mon, 30 Jan 2012 01:16:33 -0800 (PST) Received: by wibhi8 with SMTP id hi8so3393731wib.26 for ; Mon, 30 Jan 2012 01:16:32 -0800 (PST) Received: by 10.180.85.105 with SMTP id g9mr7338379wiz.12.1327914992141; Mon, 30 Jan 2012 01:16:32 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id n5sm50401947wiw.7.2012.01.30.01.16.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jan 2012 01:16:30 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id DDD43A05FB; Mon, 30 Jan 2012 09:16:28 +0000 (GMT) To: Austin Clements Subject: Re: [PATCH 1/3] emacs: Stop the `truncate-string-to-width' madness. In-Reply-To: <20120128050958.GA17991@mit.edu> References: <1327496913-4946-1-git-send-email-dme@dme.org> <1327499314-7887-1-git-send-email-dme@dme.org> <1327499314-7887-2-git-send-email-dme@dme.org> <20120128050958.GA17991@mit.edu> User-Agent: Notmuch/0.11+122~g97bdcf6 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Mon, 30 Jan 2012 09:16:24 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: Notmuch Mail 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: Mon, 30 Jan 2012 09:16:33 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, 28 Jan 2012 00:09:58 -0500, Austin Clements wrot= e: > Quoth David Edmondson on Jan 25 at 1:48 pm: > > There's no need to call `truncate-string-to-width' twice in this code > > path. >=20 > LGTM if what I point out below is okay. Technically this changes the > behavior of this code, but what it did before was obviously wrong (if > you do roll a new version, I'd mention this in the commit message; but > no need to do that just for this). >=20 > > --- > > emacs/notmuch.el | 14 ++++++-------- > > 1 files changed, 6 insertions(+), 8 deletions(-) > >=20 > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > > index 3ec0816..3f6b977 100644 > > --- a/emacs/notmuch.el > > +++ b/emacs/notmuch.el > > @@ -441,18 +441,16 @@ Complete list of currently available key bindings: > > (interactive "P") > > (let ((thread-id (notmuch-search-find-thread-id)) > > (subject (notmuch-search-find-subject))) > > + > > + (if (string-match "^[ \t]*$" subject) > > + (setq subject "[No Subject]")) > > + >=20 > Is subject necessarily a string at this point? Previously this only > ran if the code determined there was a thread at point. No, it's a bug. It's fixed in the third patch, but should be fixed here as well. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8mX+gACgkQaezQq/BJZRbPSACfdMZJjKihAzVShy5d+6ayyxVU KqwAnjMzV9EQXm52jm9wJDPDbZ/nPceg =eweS -----END PGP SIGNATURE----- --=-=-=--