Re: Flat search and threaded views
[notmuch-archives.git] / cc / a0aaad5bea740f546a9fb5823a6eb848f97b98
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 45411429E21\r
6         for <notmuch@notmuchmail.org>; Mon,  3 Jun 2013 00:16:11 -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: -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 vyOcMxVOHybI for <notmuch@notmuchmail.org>;\r
16         Mon,  3 Jun 2013 00:15:59 -0700 (PDT)\r
17 Received: from mail-we0-f174.google.com (mail-we0-f174.google.com\r
18         [74.125.82.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 0721D421180\r
21         for <notmuch@notmuchmail.org>; Mon,  3 Jun 2013 00:15:58 -0700 (PDT)\r
22 Received: by mail-we0-f174.google.com with SMTP id q58so1357211wes.5\r
23         for <notmuch@notmuchmail.org>; Mon, 03 Jun 2013 00:15:56 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type:x-gm-message-state;\r
28         bh=2CzrHMnjrrzerHmF3PlDYsqx/St92vkOVYc1BqLryDM=;\r
29         b=RMAvNGVC44tV78vrivmad7upt04grxnLmtRQvrfAmQjKwFDKtfU5itQcPC8kKSaZoS\r
30         cBLngsMe+JrGjNIBKpcjsHfu0tO87WcoyKYhW8knhL4icXwDKUT+nYiIwqVsRFYT1sJS\r
31         pDrglC25TUVW2KC6kzhFDdH7Fo/XAxX6G/g0tbJaF35fxrCf+g16dso6mP+HNjcJ2ToA\r
32         sh0VIaNXsoX42O7PVTxpKylp3eYsVuonl9Xi7z2f94alNj8bV0My5RoxNZdXKyNuGXeC\r
33         Kfj0TTS6Ui6T1HgvD32gVhZVIolH8xr9l9eY+vWML8S4V97ObB67jGl/zQyDYmKj6mLj\r
34         ShyQ==\r
35 X-Received: by 10.180.11.206 with SMTP id s14mr11027210wib.40.1370243754079;\r
36         Mon, 03 Jun 2013 00:15:54 -0700 (PDT)\r
37 Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
38         by mx.google.com with ESMTPSA id\r
39         fx7sm21268524wic.11.2013.06.03.00.15.52 for <multiple recipients>\r
40         (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
41         Mon, 03 Jun 2013 00:15:53 -0700 (PDT)\r
42 From: Jani Nikula <jani@nikula.org>\r
43 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
44 Subject: Re: [RFC PATCH] revert: Removed top level --stderr= option\r
45 In-Reply-To: <1370027431-16018-1-git-send-email-tomi.ollila@iki.fi>\r
46 References: <1370027431-16018-1-git-send-email-tomi.ollila@iki.fi>\r
47 User-Agent: Notmuch/0.15.2+128~g80473f0 (http://notmuchmail.org) Emacs/23.2.1\r
48         (x86_64-pc-linux-gnu)\r
49 Date: Mon, 03 Jun 2013 09:15:49 +0200\r
50 Message-ID: <87k3mb1x7e.fsf@nikula.org>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=us-ascii\r
53 X-Gm-Message-State:\r
54  ALoCoQnEsZLIxKKJZF7b8azJc8d9+rkZvFfaUk6HWb64ADWNHtM/OrJWh10nMzk5EeNuX89ammt8\r
55 Cc: tomi.ollila@iki.fi\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Mon, 03 Jun 2013 07:16:11 -0000\r
69 \r
70 On Fri, 31 May 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
71 > While looked good on paper, its attempted use caused confusion, complexity,\r
72 > and potential for information leak when passed through wrapper scripts.\r
73 > For slimmer code and to lessen demand for maintenance/support the set of\r
74 > commits which added top level --stderr= option is now reverted.\r
75 > ---\r
76 >\r
77 > Change was easy, commit message hard. Opinions? Revert is easiest to do now.\r
78 > Also, if someone comes with a novel idea how to utilize --stderr option\r
79 > please tell it now -- I'd be most eager to hear it :D\r
80 >\r
81 >\r
82 > This change was done the following way:\r
83 >\r
84 > $ git checkout -b rvrt b9020448bd\r
85 > $ git reset --hard HEAD^^^^\r
86 > $ git reset b9020448bd\r
87 > $ git commit -a\r
88 > $ git diff HEAD~5..HEAD\r
89 \r
90 Protip ;)\r
91 \r
92 $ git revert -n b9020448bd^^^^..b9020448bd\r
93 $ git commit\r
94 \r
95 BR,\r
96 Jani.\r
97 \r
98 >\r
99 > (last one to reveal HEAD~5 & HEAD have identical trees).\r
100 >\r
101 > Question why:\r
102 > id:20130521195549.6550.53636@thinkbox.jade-hamburg.de\r
103 >\r
104 > Good reason why not:\r
105 > id:1369934016-22308-1-git-send-email-amdragon@mit.edu\r
106 >\r
107 >\r
108 >  NEWS               |  5 -----\r
109 >  man/man1/notmuch.1 |  7 -------\r
110 >  notmuch-client.h   |  1 -\r
111 >  notmuch.c          | 32 --------------------------------\r
112 >  test/help-test     |  9 ---------\r
113 >  5 files changed, 54 deletions(-)\r
114 >\r
115 > diff --git a/NEWS b/NEWS\r
116 > index 80abd97..a7f2ec6 100644\r
117 > --- a/NEWS\r
118 > +++ b/NEWS\r
119 > @@ -35,11 +35,6 @@ Top level option to specify configuration file\r
120 >    It's now possible to specify the configuration file to use on the\r
121 >    command line using the `notmuch --config=FILE` option.\r
122 >  \r
123 > -Top level option to redirect writes to stderr\r
124 > -\r
125 > -  With `notmuch --stderr=FILE` all writes to stderr are redirected to\r
126 > -  the specified file. If FILE is '-', stderr is redirected to stdout.\r
127 > -\r
128 >  Deprecated commands "part" and "search-tags" are removed.\r
129 >  \r
130 >  Bash command-line completion\r
131 > diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1\r
132 > index f5ca0ad..033cc10 100644\r
133 > --- a/man/man1/notmuch.1\r
134 > +++ b/man/man1/notmuch.1\r
135 > @@ -76,14 +76,7 @@ Print the installed version of notmuch, and exit.\r
136 >  \r
137 >  Specify the configuration file to use. This overrides any\r
138 >  configuration file specified by ${NOTMUCH_CONFIG}.\r
139 > -.RE\r
140 > -\r
141 > -.RS 4\r
142 > -.TP 4\r
143 > -.B \-\-stderr=FILE\r
144 >  \r
145 > -Redirect all writes to stderr to the specified file.\r
146 > -If FILE is '-', stderr is redirected to stdout.\r
147 >  .RE\r
148 >  \r
149 >  .SH COMMANDS\r
150 > diff --git a/notmuch-client.h b/notmuch-client.h\r
151 > index 4a3c7ac..45749a6 100644\r
152 > --- a/notmuch-client.h\r
153 > +++ b/notmuch-client.h\r
154 > @@ -54,7 +54,6 @@ typedef GMimeCipherContext notmuch_crypto_context_t;\r
155 >  #include <sys/stat.h>\r
156 >  #include <sys/time.h>\r
157 >  #include <unistd.h>\r
158 > -#include <fcntl.h>\r
159 >  #include <dirent.h>\r
160 >  #include <errno.h>\r
161 >  #include <signal.h>\r
162 > diff --git a/notmuch.c b/notmuch.c\r
163 > index 15e90c8..f51a84f 100644\r
164 > --- a/notmuch.c\r
165 > +++ b/notmuch.c\r
166 > @@ -251,32 +251,6 @@ notmuch_command (notmuch_config_t *config,\r
167 >      return 0;\r
168 >  }\r
169 >  \r
170 > -static int\r
171 > -redirect_stderr (const char * stderr_file)\r
172 > -{\r
173 > -    if (strcmp (stderr_file, "-") == 0) {\r
174 > -     if (dup2 (STDOUT_FILENO, STDERR_FILENO) < 0) {\r
175 > -         perror ("dup2");\r
176 > -         return 1;\r
177 > -     }\r
178 > -    } else {\r
179 > -     int fd = open (stderr_file, O_WRONLY|O_CREAT|O_TRUNC, 0666);\r
180 > -     if (fd < 0) {\r
181 > -         fprintf (stderr, "Error: Cannot redirect stderr to '%s': %s\n",\r
182 > -                  stderr_file, strerror (errno));\r
183 > -         return 1;\r
184 > -     }\r
185 > -     if (fd != STDERR_FILENO) {\r
186 > -         if (dup2 (fd, STDERR_FILENO) < 0) {\r
187 > -             perror ("dup2");\r
188 > -             return 1;\r
189 > -         }\r
190 > -         close (fd);\r
191 > -     }\r
192 > -    }\r
193 > -    return 0;\r
194 > -}\r
195 > -\r
196 >  int\r
197 >  main (int argc, char *argv[])\r
198 >  {\r
199 > @@ -285,7 +259,6 @@ main (int argc, char *argv[])\r
200 >      const char *command_name = NULL;\r
201 >      command_t *command;\r
202 >      char *config_file_name = NULL;\r
203 > -    char *stderr_file = NULL;\r
204 >      notmuch_config_t *config;\r
205 >      notmuch_bool_t print_help=FALSE, print_version=FALSE;\r
206 >      int opt_index;\r
207 > @@ -295,7 +268,6 @@ main (int argc, char *argv[])\r
208 >       { NOTMUCH_OPT_BOOLEAN, &print_help, "help", 'h', 0 },\r
209 >       { NOTMUCH_OPT_BOOLEAN, &print_version, "version", 'v', 0 },\r
210 >       { NOTMUCH_OPT_STRING, &config_file_name, "config", 'c', 0 },\r
211 > -     { NOTMUCH_OPT_STRING, &stderr_file, "stderr", '\0', 0 },\r
212 >       { 0, 0, 0, 0, 0 }\r
213 >      };\r
214 >  \r
215 > @@ -315,10 +287,6 @@ main (int argc, char *argv[])\r
216 >       return 1;\r
217 >      }\r
218 >  \r
219 > -    if (stderr_file && redirect_stderr (stderr_file) != 0) {\r
220 > -     /* error already printed */\r
221 > -     return 1;\r
222 > -    }\r
223 >      if (print_help)\r
224 >       return notmuch_help_command (NULL, argc - 1, &argv[1]);\r
225 >  \r
226 > diff --git a/test/help-test b/test/help-test\r
227 > index bd0111c..f7df725 100755\r
228 > --- a/test/help-test\r
229 > +++ b/test/help-test\r
230 > @@ -9,13 +9,4 @@ test_expect_success 'notmuch help' 'notmuch help'\r
231 >  test_expect_success 'notmuch help tag' 'notmuch help tag'\r
232 >  test_expect_success 'notmuch --version' 'notmuch --version'\r
233 >  \r
234 > -test_begin_subtest "notmuch --stderr=stderr help %"\r
235 > -notmuch --stderr=stderr help %\r
236 > -test_expect_equal "$(cat stderr)" "\r
237 > -Sorry, % is not a known command. There's not much I can do to help."\r
238 > -\r
239 > -test_begin_subtest "notmuch --stderr=- help %"\r
240 > -test_expect_equal "$(notmuch --stderr=- help %)" "\r
241 > -Sorry, % is not a known command. There's not much I can do to help."\r
242 > -\r
243 >  test_done\r
244 > -- \r
245 > 1.8.0\r
246 >\r
247 > _______________________________________________\r
248 > notmuch mailing list\r
249 > notmuch@notmuchmail.org\r
250 > http://notmuchmail.org/mailman/listinfo/notmuch\r