[PATCH] test: Produce useful output when the HTML with images test fails
[notmuch-archives.git] / d3 / 239b91a6dc52723d7cef66d457aab8a9ae7ff8
1 Return-Path: <dme@dme.org>\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 19DCD431E84\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 05:48:41 -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: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 l+6WMBJihVL5 for <notmuch@notmuchmail.org>;\r
16         Wed, 25 Jan 2012 05:48:40 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  79488431FD5    for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 05:48:40 -0800\r
21  (PST)\r
22 Received: by wgbdt12 with SMTP id dt12so4808697wgb.2\r
23         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 05:48:39 -0800 (PST)\r
24 MIME-Version: 1.0\r
25 Received: by 10.180.19.130 with SMTP id f2mr11315186wie.12.1327499319293;\r
26         Wed, 25 Jan 2012 05:48:39 -0800 (PST)\r
27 Received: from hotblack-desiato.hh.sledj.net\r
28         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
29         by mx.google.com with ESMTPS id em13sm24450670wid.7.2012.01.25.05.48.37\r
30         (version=TLSv1/SSLv3 cipher=OTHER);\r
31         Wed, 25 Jan 2012 05:48:38 -0800 (PST)\r
32 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
33         id 1C3C39FE6A; Wed, 25 Jan 2012 13:48:36 +0000 (GMT)\r
34 From: David Edmondson <dme@dme.org>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH 1/3] emacs: Stop the `truncate-string-to-width' madness.\r
37 Date: Wed, 25 Jan 2012 13:48:32 +0000\r
38 Message-Id: <1327499314-7887-2-git-send-email-dme@dme.org>\r
39 X-Mailer: git-send-email 1.7.8.3\r
40 In-Reply-To: <1327499314-7887-1-git-send-email-dme@dme.org>\r
41 References: <1327496913-4946-1-git-send-email-dme@dme.org>\r
42         <1327499314-7887-1-git-send-email-dme@dme.org>\r
43 X-Gm-Message-State:\r
44  ALoCoQnCAOEQZ0sZUam5AsijUP2GPj3tYxXou+S/Vf6sU17+p8CzwpE/AJtQCo83M5mNVO/N1NmH\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Wed, 25 Jan 2012 13:48:41 -0000\r
58 \r
59 There's no need to call `truncate-string-to-width' twice in this code\r
60 path.\r
61 ---\r
62  emacs/notmuch.el |   14 ++++++--------\r
63  1 files changed, 6 insertions(+), 8 deletions(-)\r
64 \r
65 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
66 index 3ec0816..3f6b977 100644\r
67 --- a/emacs/notmuch.el\r
68 +++ b/emacs/notmuch.el\r
69 @@ -441,18 +441,16 @@ Complete list of currently available key bindings:\r
70    (interactive "P")\r
71    (let ((thread-id (notmuch-search-find-thread-id))\r
72         (subject (notmuch-search-find-subject)))\r
73 +\r
74 +    (if (string-match "^[ \t]*$" subject)\r
75 +       (setq subject "[No Subject]"))\r
76 +\r
77      (if (> (length thread-id) 0)\r
78         (notmuch-show thread-id\r
79                       (current-buffer)\r
80                       notmuch-search-query-string\r
81 -                     ;; name the buffer based on notmuch-search-find-subject\r
82 -                     (if (string-match "^[ \t]*$" subject)\r
83 -                         "[No Subject]"\r
84 -                       (truncate-string-to-width\r
85 -                        (concat "*"\r
86 -                                (truncate-string-to-width subject 32 nil nil t)\r
87 -                                "*")\r
88 -                        32 nil nil t))\r
89 +                     ;; Name the buffer based on the subject.\r
90 +                     (concat "*" (truncate-string-to-width subject 30 nil nil t) "*")\r
91                       crypto-switch)\r
92        (message "End of search results."))))\r
93  \r
94 -- \r
95 1.7.8.3\r
96 \r