Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / bc / ff1d044526e69ea2a82b249ea620c0a008abb7
1 Return-Path: <jani@nikula.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 50AA8429E34\r
6         for <notmuch@notmuchmail.org>; Mon,  2 Mar 2015 10:14:31 -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: 1.738\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id OPvrJ9lOSwsH for <notmuch@notmuchmail.org>;\r
17         Mon,  2 Mar 2015 10:14:28 -0800 (PST)\r
18 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com\r
19         [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 215A3414B87\r
22         for <notmuch@notmuchmail.org>; Mon,  2 Mar 2015 09:49:34 -0800 (PST)\r
23 Received: by widex7 with SMTP id ex7so15943858wid.1\r
24         for <notmuch@notmuchmail.org>; Mon, 02 Mar 2015 09:46:54 -0800 (PST)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
28         :references;\r
29         bh=yX764r3Ad6gCozhZVgLh37yD1RZazCV359veLPiXW0A=;\r
30         b=GyjcNVx2jMzSIfkcaXsjqZHNIHFkq850YLbA1u2BZHJMz0CkidHPyZZQyujUpWMQ8q\r
31         y8Jqx4a0vZDSupQ7Up4lKXQcX88cSWasqSiNpD3VvuW7act+ZUAQHNegnQUtBj3xqgoj\r
32         30c9+z+LfMp1t090hXslHQhEEALhT1FzL6Z6Z7YMP508DhHLiP9Vh5arNgd05o29dk0D\r
33         MeOXeLeoZTjLa5VF5X2DTaU5+/8GC8fFtyhtkn77v8pnfhz/J/6/WrKB79zQu9k2ByOA\r
34         oTuFmKtjpY9rgmH3ame67RMsJdKdPMQ01dlZgdbWZhSIHpNRj4Ut1yjaX6CzRegqE+hZ\r
35         Ec/w==\r
36 X-Gm-Message-State:\r
37  ALoCoQl1wjZNtzW4nsM/VnP92uKTFdLRGszlVbIXbj7hyv133Xowzr9/Ra/amFJXYw2bJMLUomcF\r
38 X-Received: by 10.194.104.99 with SMTP id gd3mr1156869wjb.114.1425318414038;\r
39         Mon, 02 Mar 2015 09:46:54 -0800 (PST)\r
40 Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi.\r
41         [188.238.59.76])\r
42         by mx.google.com with ESMTPSA id u6sm17034127wix.12.2015.03.02.09.46.53\r
43         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
44         Mon, 02 Mar 2015 09:46:53 -0800 (PST)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: notmuch@notmuchmail.org\r
47 Subject: [PATCH 4/4] parse-time-string: fix setting and rounding of seconds\r
48 Date: Mon,  2 Mar 2015 19:47:04 +0200\r
49 Message-Id: <1425318424-27017-4-git-send-email-jani@nikula.org>\r
50 X-Mailer: git-send-email 2.1.4\r
51 In-Reply-To: <1425318424-27017-1-git-send-email-jani@nikula.org>\r
52 References: <1425318424-27017-1-git-send-email-jani@nikula.org>\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Mon, 02 Mar 2015 18:14:31 -0000\r
66 \r
67 If seconds are not specified in the string to be parsed, they're not\r
68 set according to the reference time (in the no rounding case) nor\r
69 rounded properly (in the rounding up cases). Fix this.\r
70 \r
71 The bug caused searches such as date:10:30..10:30 to match messages\r
72 with date exactly 10:30:00 only, and not in range 10:30:00..10:30:59\r
73 (inclusive) as documented.\r
74 \r
75 Note that date searches referring "noon" or "5pm" will still be\r
76 interpreted as exact to the second.\r
77 ---\r
78  parse-time-string/parse-time-string.c | 4 ++--\r
79  test/T490-parse-time-string.sh        | 1 -\r
80  2 files changed, 2 insertions(+), 3 deletions(-)\r
81 \r
82 diff --git a/parse-time-string/parse-time-string.c b/parse-time-string/parse-time-string.c\r
83 index ccad422b3c8d..1cef47d4b0bd 100644\r
84 --- a/parse-time-string/parse-time-string.c\r
85 +++ b/parse-time-string/parse-time-string.c\r
86 @@ -1081,10 +1081,10 @@ parse_time (struct state *state, char sep,\r
87         return set_user_tz (state, state->delim, v1, v2);\r
88      }\r
89  \r
90 -    if (!is_valid_time (v1, v2, v3))\r
91 +    if (!is_valid_time (v1, v2, n3 ? v3 : 0))\r
92         return -PARSE_TIME_ERR_INVALIDTIME;\r
93  \r
94 -    return set_abs_time (state, v1, v2, n3 ? v3 : 0);\r
95 +    return set_abs_time (state, v1, v2, n3 ? (int) v3 : UNSET);\r
96  }\r
97  \r
98  /* strtoul helper that assigns length. */\r
99 diff --git a/test/T490-parse-time-string.sh b/test/T490-parse-time-string.sh\r
100 index 9247bdf89543..6aa9d433bfd4 100755\r
101 --- a/test/T490-parse-time-string.sh\r
102 +++ b/test/T490-parse-time-string.sh\r
103 @@ -79,7 +79,6 @@ ${TEST_DIRECTORY}/parse-time --ref=${REFERENCE} < INPUT > OUTPUT\r
104  test_expect_equal_file INPUT OUTPUT\r
105  \r
106  test_begin_subtest "Second rounding tests"\r
107 -test_subtest_known_broken\r
108  REFERENCE=$(_date Tue Jan 11 12:13:14 +0000 2011)\r
109  cat <<EOF > INPUT\r
110  9:15         ==> Tue Jan 11 09:15:14 +0000 2011\r
111 -- \r
112 2.1.4\r
113 \r