1 Return-Path: <amdragon@mit.edu>
\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 DD055431FB6
\r
6 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 19:17:42 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 UxQaiVbm9TFB for <notmuch@notmuchmail.org>;
\r
16 Sat, 15 Dec 2012 19:17:42 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 8F42E431FBD
\r
20 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 19:17:41 -0800 (PST)
\r
21 X-AuditID: 1209190e-b7f516d0000008e4-aa-50cd3d548867
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 73.C1.02276.45D3DC05; Sat, 15 Dec 2012 22:17:40 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qBG3HdbT012438;
\r
27 Sat, 15 Dec 2012 22:17:39 -0500
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qBG3HbYW012058
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sat, 15 Dec 2012 22:17:38 -0500 (EST)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1Tk4jP-0007c8-Mj; Sat, 15 Dec 2012 22:17:35 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 4/7] reply: Support --format-version
\r
41 Date: Sat, 15 Dec 2012 22:17:26 -0500
\r
42 Message-Id: <1355627849-29099-5-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1355627849-29099-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1355627849-29099-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6nohtiezbA4NQOU4vVc3ksrt+cyezA
\r
48 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZcz9NoOx4CFfRf/c5YwNjNe5uxg5OSQETCTe
\r
49 /fzOCmGLSVy4t56ti5GLQ0hgH6PEyu1PGCGcDYwSBzecZYFwHjFJPOn5xw7hzGWUmDrjAjNI
\r
50 P5uAhsS2/csZQWwRAWmJnXdng81lFnCU+Lx/ERuILQy0r7f3Glg9i4CqxNTVZ1hAbF4BB4kP
\r
51 zX/YIO5QlOh+NgHM5gTq3bzlJ5gtBFQz+8hRtgmM/AsYGVYxyqbkVunmJmbmFKcm6xYnJ+bl
\r
52 pRbpGuvlZpbopaaUbmIEhRKnJN8Oxq8HlQ4xCnAwKvHwWnw9EyDEmlhWXJl7iFGSg0lJlDfH
\r
53 8myAEF9SfkplRmJxRnxRaU5q8SFGCQ5mJRHepPlA5bwpiZVVqUX5MClpDhYlcd4rKTf9hQTS
\r
54 E0tSs1NTC1KLYLIyHBxKErzMNkBDBYtS01Mr0jJzShDSTBycIMN5gIYrg9TwFhck5hZnpkPk
\r
55 TzEqSonzSoEkBEASGaV5cL2wWH/FKA70ijCvBkgVDzBNwHW/AhrMBDR4uQ3I1cUliQgpqQbG
\r
56 DR+Y+G/zHRF4uGLt2Uuqa/9nbRVouxhSPeHKT+VrQWW1soUNy3dd+toyl8OIZ2PW6+b7nzkv
\r
57 rgt9cCVozfRNE0pc1aX1tpbd2n5k4pof4stDOBev22R653+IgFH7zLhK9+n7WQwa5k4Xiut6
\r
58 VmftsuL+PE4vyy+Tyl/KuO7/wdF1xGymeLLhSyWW4oxEQy3mouJEABX4TXjQAgAA
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Sun, 16 Dec 2012 03:17:43 -0000
\r
74 man/man1/notmuch-reply.1 | 21 +++++++++++++++++++++
\r
75 notmuch-reply.c | 3 +++
\r
76 2 files changed, 24 insertions(+)
\r
78 diff --git a/man/man1/notmuch-reply.1 b/man/man1/notmuch-reply.1
\r
79 index fa04c9e..9fa1956 100644
\r
80 --- a/man/man1/notmuch-reply.1
\r
81 +++ b/man/man1/notmuch-reply.1
\r
82 @@ -57,6 +57,16 @@ to create a reply message intelligently.
\r
83 Only produces In\-Reply\-To, References, To, Cc, and Bcc headers.
\r
89 +.BR \-\-format-version=N
\r
91 +Use the specified structured output format version. This is intended
\r
92 +for programs that invoke \fBnotmuch\fR(1) internally. If omitted, the
\r
93 +latest supported version will be used.
\r
98 .BR \-\-reply\-to= ( all | sender )
\r
99 @@ -99,6 +109,17 @@ formats do not.
\r
105 +This command supports the following special exit status codes
\r
109 +The requested format version is too old.
\r
112 +The requested format version is too new.
\r
116 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
\r
117 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
118 index 720749d..22c58ff 100644
\r
119 --- a/notmuch-reply.c
\r
120 +++ b/notmuch-reply.c
\r
121 @@ -733,6 +733,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
\r
122 { "sexp", FORMAT_SEXP },
\r
123 { "headers-only", FORMAT_HEADERS_ONLY },
\r
125 + { NOTMUCH_OPT_INT, ¬much_format_version, "format-version", 0, 0 },
\r
126 { NOTMUCH_OPT_KEYWORD, &reply_all, "reply-to", 'r',
\r
127 (notmuch_keyword_t []){ { "all", TRUE },
\r
128 { "sender", FALSE },
\r
129 @@ -759,6 +760,8 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
\r
130 reply_format_func = notmuch_reply_format_default;
\r
133 + notmuch_exit_if_unsupported_format ();
\r
135 config = notmuch_config_open (ctx, NULL, NULL);
\r
136 if (config == NULL)
\r