Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f7 / d1ed12802aba4009356febd53cf4a9ffe8b541
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 A4839431FD9\r
6         for <notmuch@notmuchmail.org>; Sun,  8 Mar 2015 09:18:47 -0700 (PDT)\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 n6m7GNhMb4bQ for <notmuch@notmuchmail.org>;\r
17         Sun,  8 Mar 2015 09:18:44 -0700 (PDT)\r
18 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com\r
19         [74.125.82.171]) (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 44837431FBD\r
22         for <notmuch@notmuchmail.org>; Sun,  8 Mar 2015 09:18:44 -0700 (PDT)\r
23 Received: by wesw62 with SMTP id w62so6316149wes.0\r
24         for <notmuch@notmuchmail.org>; Sun, 08 Mar 2015 09:18:43 -0700 (PDT)\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=42rGcw44qdL8cCU5YS4fALBEZVdfowo2nTW0Vvih5J4=;\r
30         b=US6wo09fsWO+kdA8qPb1b0WqDhCevwu7wwG2Mh1QSZ/sLM70gHIIV+fPThV9zDIlfi\r
31         rytPTjMUE7qJHHMKZePxtb8AKCQG+65soXfn8iZr6BqwNkOgFAynWuOWdk2VZD9BswgA\r
32         /CxpoqAvLhShrZrbdhIYXHJFDvBnD8ZlZQlxQOYNmJ3H+2Njdy6+oYlgduHWF6N/D5VQ\r
33         EjcfdA9En7Ozjh6vI2EmqY13PYRq+gr6XFXsPL3pP85IAt7vuSZC3uNquK+WAiiASeiG\r
34         wMMaHY4q95vUgR4TJGzyHvxRrP0FuK0g/h6QM1yGXqY5sWBsML2OEPsgEmCWgMPXyjIb\r
35         EbSQ==\r
36 X-Gm-Message-State:\r
37  ALoCoQmai43zbgH8Xo+GIhu66rE3FTzTxL/nXrj9YMBwq/yGQtcHWqfscKc390IVtHVbWFNuJ/lH\r
38 X-Received: by 10.194.223.103 with SMTP id qt7mr47474148wjc.35.1425831523269; \r
39         Sun, 08 Mar 2015 09:18:43 -0700 (PDT)\r
40 Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi.\r
41         [188.238.59.76]) by mx.google.com with ESMTPSA id\r
42         y14sm24336045wjr.39.2015.03.08.09.18.40\r
43         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
44         Sun, 08 Mar 2015 09:18:41 -0700 (PDT)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: notmuch@notmuchmail.org\r
47 Subject: [PATCH 2/2] cli: add support for notmuch command --help\r
48 Date: Sun,  8 Mar 2015 18:18:55 +0200\r
49 Message-Id: <1425831535-15920-2-git-send-email-jani@nikula.org>\r
50 X-Mailer: git-send-email 2.1.4\r
51 In-Reply-To: <1425831535-15920-1-git-send-email-jani@nikula.org>\r
52 References: <1425831535-15920-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: Sun, 08 Mar 2015 16:18:47 -0000\r
66 \r
67 Recognize 'notmuch command --help' at the top level as a special case,\r
68 and show help for the command. Note that for simplicity, --help is\r
69 only recognized as the first option for the subcommand.\r
70 \r
71 ---\r
72 \r
73 Creeping featurism or useful? ISTR Mark wanted this.\r
74 ---\r
75  notmuch.c | 4 +++-\r
76  1 file changed, 3 insertions(+), 1 deletion(-)\r
77 \r
78 diff --git a/notmuch.c b/notmuch.c\r
79 index 1717e8b3683c..a5b2877aee09 100644\r
80 --- a/notmuch.c\r
81 +++ b/notmuch.c\r
82 @@ -314,7 +314,9 @@ main (int argc, char *argv[])\r
83         goto DONE;\r
84      }\r
85  \r
86 -    if (print_help) {\r
87 +    /* Handle notmuch --help [command] and notmuch command --help. */\r
88 +    if (print_help ||\r
89 +       (opt_index + 1 < argc && strcmp (argv[opt_index + 1], "--help") == 0)) {\r
90         /*\r
91          * Pass the first positional argument as argv[1] so the help\r
92          * command can give help for it. The help command ignores the\r
93 -- \r
94 2.1.4\r
95 \r