From 00c2e32fd4b296d17360ab5b22fb7e927e01d01b Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 21 May 2013 21:55:49 +0200 Subject: [PATCH] Re: [RFC PATCH 1/1] add --stderr option --- 21/93ce8880819ef1b14d3667bffa3518f895ee5a | 93 +++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 21/93ce8880819ef1b14d3667bffa3518f895ee5a diff --git a/21/93ce8880819ef1b14d3667bffa3518f895ee5a b/21/93ce8880819ef1b14d3667bffa3518f895ee5a new file mode 100644 index 000000000..6f84a12ba --- /dev/null +++ b/21/93ce8880819ef1b14d3667bffa3518f895ee5a @@ -0,0 +1,93 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 98463431FBF + for ; Tue, 21 May 2013 12:56:25 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.001 +X-Spam-Level: +X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 + tests=[UNPARSEABLE_RELAY=0.001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id pXg9pIAMqO3X for ; + Tue, 21 May 2013 12:56:18 -0700 (PDT) +Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id EED75431FB6 + for ; Tue, 21 May 2013 12:56:17 -0700 (PDT) +Received: from mail.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by mail.cryptobitch.de (Postfix) with ESMTPSA id 36FEA62E0E6 + for ; Tue, 21 May 2013 21:55:55 +0200 (CEST) +Received: by mail.jade-hamburg.de (Postfix, from userid 401) + id C100EDF2A2; Tue, 21 May 2013 21:55:52 +0200 (CEST) +Received: from thinkbox.jade-hamburg.de (unknown + [IPv6:fe80::213:e8ff:fe51:7a89%br0]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) (Authenticated sender: teythoon) + by mail.jade-hamburg.de (Postfix) with ESMTPSA id BC53CDF28B; + Tue, 21 May 2013 21:55:51 +0200 (CEST) +Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.80) + (envelope-from ) + id 1Uesf0-00031b-7y; Tue, 21 May 2013 21:55:50 +0200 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +To: Tomi Ollila , notmuch@notmuchmail.org +From: Justus Winter <4winter@informatik.uni-hamburg.de> +In-Reply-To: <1369161750-12342-1-git-send-email-tomi.ollila@iki.fi> +References: <1369161750-12342-1-git-send-email-tomi.ollila@iki.fi> +Message-ID: <20130521195549.6550.53636@thinkbox.jade-hamburg.de> +User-Agent: alot/0.3.3+ +Subject: Re: [RFC PATCH 1/1] add --stderr option +Date: Tue, 21 May 2013 21:55:49 +0200 +Cc: tomi.ollila@iki.fi +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 21 May 2013 19:56:25 -0000 + +Quoting Tomi Ollila (2013-05-21 20:42:30) +> --- +> = + +> Note quickly written untested code (but compiles!), just to show an idea.= +.. +> = + +> This implements (i hope) curl(1) --stderr option in notmuch(1): +> = + +> --stderr +> Redirect all writes to stderr to the specified file instea= +d. If +> the file name is a plain '-', it is instead written to stdo= +ut. +> = + +> This would be useful in emacs interface. + +Hm, shouldn't it be possible to bind a pipe(2) to stderr instead? I +mean in the process of running the notmuch binary (i.e. somewhere +along the lines of fork and exec)? + +I've implemented this for alot, which does not use the binary but +directly calls into libnotmuch, but does so in a helper process. Said +helper has a pipe(2) on stderr and the alot process reads from it and +turns any line into a log message. + +Justus -- 2.26.2