From: Jesse Rosenthal Date: Wed, 29 Oct 2014 20:51:42 +0000 (+2000) Subject: [v2 0/3] Avoid empty thread names if possible X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4e827fd4979e3287b0d2e02e806ff859d753c965;p=notmuch-archives.git [v2 0/3] Avoid empty thread names if possible --- diff --git a/98/2b1b43b3aa470128c09458f92c599f83e91611 b/98/2b1b43b3aa470128c09458f92c599f83e91611 new file mode 100644 index 000000000..8dea124f9 --- /dev/null +++ b/98/2b1b43b3aa470128c09458f92c599f83e91611 @@ -0,0 +1,77 @@ +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 1ED4A431FB6 + for ; Wed, 29 Oct 2014 14:52:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 Nh5q63cbOL-K for ; + Wed, 29 Oct 2014 14:52:14 -0700 (PDT) +X-Greylist: delayed 3602 seconds by postgrey-1.32 at olra; + Wed, 29 Oct 2014 14:52:14 PDT +Received: from smtpauth.johnshopkins.edu (smtpauth.johnshopkins.edu + [162.129.8.150]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 456E1431FC2 + for ; Wed, 29 Oct 2014 14:52:14 -0700 (PDT) +X-IronPort-AV: E=Sophos;i="5.07,279,1413259200"; d="scan'208";a="109648845" +Received: from guppy.hwcampus.jhu.edu (HELO localhost) ([10.161.32.234]) + by ipex0.johnshopkins.edu with ESMTP/TLS/AES128-SHA; + 29 Oct 2014 16:52:10 -0400 +From: Jesse Rosenthal +To: notmuch@notmuchmail.org +Subject: [v2 0/3] Avoid empty thread names if possible +Date: Wed, 29 Oct 2014 16:51:42 -0400 +Message-Id: <1414615905-22554-1-git-send-email-jrosenthal@jhu.edu> +X-Mailer: git-send-email 2.1.2 +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: Wed, 29 Oct 2014 21:52:22 -0000 + +This is the second go at avoiding empty thread names. The differences +from the first version are: + + * Compare empty strings by checking for '\0' in first character + (using a macro) as suggested by Tomi Ollila. + + * Make sure that threads are titled correctly regardless of sorting + order. In this version we only add change the subject in + _thread_set_subject_from_message if the subject (after cleaning + "Re:") is non-empty. This is necessary for + oldest-first. newest-first works the same as before. + + * Add tests. This means that we have to force the test suite to + accept a non-empty header. I called the dummy subject + `@FORCE_EMPTY` to differentiate from a normal string, but not + invoke any special shell-ness. + +Jesse Rosenthal (3): + thread.cc: Avoid empty thread names if possible. + test-lib: Add dummy subject to force empty subject + thread-naming test: Test empty subject names. + + lib/thread.cc | 16 +++++++++++----- + test/T200-thread-naming.sh | 32 ++++++++++++++++++++++++++++++++ + test/test-lib.sh | 2 ++ + 3 files changed, 45 insertions(+), 5 deletions(-) + +-- +2.1.2 +