--- /dev/null
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 123F0431FBD\r
+ for <notmuch@notmuchmail.org>; Fri, 31 May 2013 12:10:43 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id RfFAJ-t0HkGg for <notmuch@notmuchmail.org>;\r
+ Fri, 31 May 2013 12:10:35 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 28B07431FC7\r
+ for <notmuch@notmuchmail.org>; Fri, 31 May 2013 12:10:35 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 9110910009D; Fri, 31 May 2013 22:10:34 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH] revert: Removed top level --stderr= option\r
+Date: Fri, 31 May 2013 22:10:31 +0300\r
+Message-Id: <1370027431-16018-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 31 May 2013 19:10:43 -0000\r
+\r
+While looked good on paper, its attempted use caused confusion, complexity,\r
+and potential for information leak when passed through wrapper scripts.\r
+For slimmer code and to lessen demand for maintenance/support the set of\r
+commits which added top level --stderr= option is now reverted.\r
+---\r
+\r
+Change was easy, commit message hard. Opinions? Revert is easiest to do now.\r
+Also, if someone comes with a novel idea how to utilize --stderr option\r
+please tell it now -- I'd be most eager to hear it :D\r
+\r
+\r
+This change was done the following way:\r
+\r
+$ git checkout -b rvrt b9020448bd\r
+$ git reset --hard HEAD^^^^\r
+$ git reset b9020448bd\r
+$ git commit -a\r
+$ git diff HEAD~5..HEAD\r
+\r
+(last one to reveal HEAD~5 & HEAD have identical trees).\r
+\r
+Question why:\r
+id:20130521195549.6550.53636@thinkbox.jade-hamburg.de\r
+\r
+Good reason why not:\r
+id:1369934016-22308-1-git-send-email-amdragon@mit.edu\r
+\r
+\r
+ NEWS | 5 -----\r
+ man/man1/notmuch.1 | 7 -------\r
+ notmuch-client.h | 1 -\r
+ notmuch.c | 32 --------------------------------\r
+ test/help-test | 9 ---------\r
+ 5 files changed, 54 deletions(-)\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 80abd97..a7f2ec6 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -35,11 +35,6 @@ Top level option to specify configuration file\r
+ It's now possible to specify the configuration file to use on the\r
+ command line using the `notmuch --config=FILE` option.\r
+ \r
+-Top level option to redirect writes to stderr\r
+-\r
+- With `notmuch --stderr=FILE` all writes to stderr are redirected to\r
+- the specified file. If FILE is '-', stderr is redirected to stdout.\r
+-\r
+ Deprecated commands "part" and "search-tags" are removed.\r
+ \r
+ Bash command-line completion\r
+diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1\r
+index f5ca0ad..033cc10 100644\r
+--- a/man/man1/notmuch.1\r
++++ b/man/man1/notmuch.1\r
+@@ -76,14 +76,7 @@ Print the installed version of notmuch, and exit.\r
+ \r
+ Specify the configuration file to use. This overrides any\r
+ configuration file specified by ${NOTMUCH_CONFIG}.\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-stderr=FILE\r
+ \r
+-Redirect all writes to stderr to the specified file.\r
+-If FILE is '-', stderr is redirected to stdout.\r
+ .RE\r
+ \r
+ .SH COMMANDS\r
+diff --git a/notmuch-client.h b/notmuch-client.h\r
+index 4a3c7ac..45749a6 100644\r
+--- a/notmuch-client.h\r
++++ b/notmuch-client.h\r
+@@ -54,7 +54,6 @@ typedef GMimeCipherContext notmuch_crypto_context_t;\r
+ #include <sys/stat.h>\r
+ #include <sys/time.h>\r
+ #include <unistd.h>\r
+-#include <fcntl.h>\r
+ #include <dirent.h>\r
+ #include <errno.h>\r
+ #include <signal.h>\r
+diff --git a/notmuch.c b/notmuch.c\r
+index 15e90c8..f51a84f 100644\r
+--- a/notmuch.c\r
++++ b/notmuch.c\r
+@@ -251,32 +251,6 @@ notmuch_command (notmuch_config_t *config,\r
+ return 0;\r
+ }\r
+ \r
+-static int\r
+-redirect_stderr (const char * stderr_file)\r
+-{\r
+- if (strcmp (stderr_file, "-") == 0) {\r
+- if (dup2 (STDOUT_FILENO, STDERR_FILENO) < 0) {\r
+- perror ("dup2");\r
+- return 1;\r
+- }\r
+- } else {\r
+- int fd = open (stderr_file, O_WRONLY|O_CREAT|O_TRUNC, 0666);\r
+- if (fd < 0) {\r
+- fprintf (stderr, "Error: Cannot redirect stderr to '%s': %s\n",\r
+- stderr_file, strerror (errno));\r
+- return 1;\r
+- }\r
+- if (fd != STDERR_FILENO) {\r
+- if (dup2 (fd, STDERR_FILENO) < 0) {\r
+- perror ("dup2");\r
+- return 1;\r
+- }\r
+- close (fd);\r
+- }\r
+- }\r
+- return 0;\r
+-}\r
+-\r
+ int\r
+ main (int argc, char *argv[])\r
+ {\r
+@@ -285,7 +259,6 @@ main (int argc, char *argv[])\r
+ const char *command_name = NULL;\r
+ command_t *command;\r
+ char *config_file_name = NULL;\r
+- char *stderr_file = NULL;\r
+ notmuch_config_t *config;\r
+ notmuch_bool_t print_help=FALSE, print_version=FALSE;\r
+ int opt_index;\r
+@@ -295,7 +268,6 @@ main (int argc, char *argv[])\r
+ { NOTMUCH_OPT_BOOLEAN, &print_help, "help", 'h', 0 },\r
+ { NOTMUCH_OPT_BOOLEAN, &print_version, "version", 'v', 0 },\r
+ { NOTMUCH_OPT_STRING, &config_file_name, "config", 'c', 0 },\r
+- { NOTMUCH_OPT_STRING, &stderr_file, "stderr", '\0', 0 },\r
+ { 0, 0, 0, 0, 0 }\r
+ };\r
+ \r
+@@ -315,10 +287,6 @@ main (int argc, char *argv[])\r
+ return 1;\r
+ }\r
+ \r
+- if (stderr_file && redirect_stderr (stderr_file) != 0) {\r
+- /* error already printed */\r
+- return 1;\r
+- }\r
+ if (print_help)\r
+ return notmuch_help_command (NULL, argc - 1, &argv[1]);\r
+ \r
+diff --git a/test/help-test b/test/help-test\r
+index bd0111c..f7df725 100755\r
+--- a/test/help-test\r
++++ b/test/help-test\r
+@@ -9,13 +9,4 @@ test_expect_success 'notmuch help' 'notmuch help'\r
+ test_expect_success 'notmuch help tag' 'notmuch help tag'\r
+ test_expect_success 'notmuch --version' 'notmuch --version'\r
+ \r
+-test_begin_subtest "notmuch --stderr=stderr help %"\r
+-notmuch --stderr=stderr help %\r
+-test_expect_equal "$(cat stderr)" "\r
+-Sorry, % is not a known command. There's not much I can do to help."\r
+-\r
+-test_begin_subtest "notmuch --stderr=- help %"\r
+-test_expect_equal "$(notmuch --stderr=- help %)" "\r
+-Sorry, % is not a known command. There's not much I can do to help."\r
+-\r
+ test_done\r
+-- \r
+1.8.0\r
+\r