Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 9a / 8c142e126e5d5a62067ee63eb004a47c8f2a7a
1 Return-Path: <sojka@merica.cz>\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 D9EDC431E82\r
6         for <notmuch@notmuchmail.org>; Tue,  4 Nov 2014 14:00:08 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 47myDmS1cY+x for <notmuch@notmuchmail.org>;\r
16         Tue,  4 Nov 2014 14:00:01 -0800 (PST)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id 80FF6431FAE\r
19         for <notmuch@notmuchmail.org>; Tue,  4 Nov 2014 14:00:01 -0800 (PST)\r
20 Received: from localhost (unknown [192.168.200.7])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 0C1E15CD17F;\r
22         Tue,  4 Nov 2014 22:59:58 +0100 (CET)\r
23 X-Virus-Scanned: IMAP STYX AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id n5ATZ5kLYTw6; Tue,  4 Nov 2014 22:59:53 +0100 (CET)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id 986285CD170;\r
30         Tue,  4 Nov 2014 22:59:53 +0100 (CET)\r
31 Received: from wsh by steelpick.2x.cz with local (Exim 4.84)\r
32         (envelope-from <sojka@merica.cz>)\r
33         id 1Xlm8h-0006bO-Vg; Tue, 04 Nov 2014 22:59:47 +0100\r
34 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
35 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
36 Subject: Re: [PATCH v2 06/10] cli: Introduce "notmuch address" command\r
37 In-Reply-To: <87d293mp9c.fsf@maritornes.cs.unb.ca>\r
38 References: <1415058622-21162-1-git-send-email-sojkam1@fel.cvut.cz>\r
39         <1415058622-21162-7-git-send-email-sojkam1@fel.cvut.cz>\r
40         <87d293mp9c.fsf@maritornes.cs.unb.ca>\r
41 User-Agent: Notmuch/0.18.2+157~ga00d359 (http://notmuchmail.org) Emacs/24.3.1\r
42         (x86_64-pc-linux-gnu)\r
43 Date: Tue, 04 Nov 2014 22:59:47 +0100\r
44 Message-ID: <871tpimxt8.fsf@steelpick.2x.cz>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Tue, 04 Nov 2014 22:00:09 -0000\r
60 \r
61 On Tue, Nov 04 2014, David Bremner wrote:\r
62 > Michal Sojka <sojkam1@fel.cvut.cz> writes:\r
63 >\r
64 >> +{\r
65 >> +    local cur prev words cword split\r
66 >> +    _init_completion -s || return\r
67 >> +\r
68 >> +    $split &&\r
69 >> +    case "${prev}" in\r
70 >> +    --format)\r
71 >> +        COMPREPLY=( $( compgen -W "json sexp text text0" -- "${cur}" ) )\r
72 >> +        return\r
73 >> +        ;;\r
74 >> +    --output)\r
75 >> +        COMPREPLY=( $( compgen -W "sender recipients" -- "${cur}" ) )\r
76 >> +        return\r
77 >> +        ;;\r
78 >> +    --sort)\r
79 >> +        COMPREPLY=( $( compgen -W "newest-first oldest-first" -- "${cur}" ) )\r
80 >> +        return\r
81 >> +        ;;\r
82 >> +    --exclude)\r
83 >> +        COMPREPLY=( $( compgen -W "true false flag all" -- "${cur}" ) )\r
84 >> +        return\r
85 >> +        ;;\r
86 >> +    esac\r
87 >> +\r
88 >> +    ! $split &&\r
89 >> +    case "${cur}" in\r
90 >> +    -*)\r
91 >> +        local options="--format= --output= --sort= --exclude="\r
92 >> +        compopt -o nospace\r
93 >> +        COMPREPLY=( $(compgen -W "$options" -- ${cur}) )\r
94 >> +        ;;\r
95 >> +    *)\r
96 >> +        _notmuch_search_terms\r
97 >> +        ;;\r
98 >> +    esac\r
99 >> +}\r
100 >> +\r
101 >\r
102 > I am reminded that we have no tests for shell completion stuff, which\r
103 > seems pretty fragile.\r
104 >\r
105 >> +\r
106 >> +    ``--format=``\ (**json**\ \|\ **sexp**\ \|\ **text**\ \|\ **text0**)\r
107 >> +        Presents the results in either JSON, S-Expressions, newline\r
108 >> +        character separated plain-text (default), or null character\r
109 >> +        separated plain-text (compatible with **xargs(1)** -0 option\r
110 >> +        where available).\r
111 >> +\r
112 >> +    ``--format-version=N``\r
113 >> +        Use the specified structured output format version. This is\r
114 >> +        intended for programs that invoke **notmuch(1)** internally. If\r
115 >> +        omitted, the latest supported version will be used.\r
116 >> +\r
117 >\r
118 >\r
119 > I wonder if at some point we should have a notmuch-output-formats.7 page.\r
120 >\r
121 >\r
122 >> +    ``--exclude=(true|false|all|flag)``\r
123 >> +        A message is called "excluded" if it matches at least one tag in\r
124 >> +        search.tag\_exclude that does not appear explicitly in the\r
125 >> +        search terms. This option specifies whether to omit excluded\r
126 >> +        messages in the search process.\r
127 >\r
128 > Similarly for excludes.  I'm ok with the duplication for now, and I can\r
129 > see an argument for not making the user chase references.\r
130 \r
131 What about using RST include directive [1] to include shared parts into\r
132 more documents?\r
133 \r
134 [1] http://docutils.sourceforge.net/docs/ref/rst/directives.html#including-an-external-document-fragment\r
135 \r
136 -Michal\r