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 767BF429E26 for ; Thu, 6 Oct 2011 17:38:04 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 H+mneYGozk2K for ; Thu, 6 Oct 2011 17:38:03 -0700 (PDT) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id AE04D431FB6 for ; Thu, 6 Oct 2011 17:38:03 -0700 (PDT) Received: by bkbzt12 with SMTP id zt12so4753217bkb.26 for ; Thu, 06 Oct 2011 17:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=gOLIoNHCUjXKJ2qorfoZPktCvptDFbaJ+sCnGMD53vA=; b=RmDHyoEB6dL3V5Io7vxfI/pkFOjkecx71pk784YYA5xFzbsCZ+nKHourEz8NKqyRd1 C4zugcjjHFSSXWFH5PVwkD/IQLhn61l6fj/uS2RxuNfoRXTpOqCg2aFzxUUSHCxCL62s 5V0pz3hYL0yAaLUuGzxhJO4O8UGID8PXc8I5M= Received: by 10.204.13.148 with SMTP id c20mr936549bka.268.1317947882147; Thu, 06 Oct 2011 17:38:02 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id e14sm7228018bka.0.2011.10.06.17.38.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Oct 2011 17:38:01 -0700 (PDT) From: Dmitry Kurochkin To: David Bremner Subject: Re: output file argument to notmuch dump. In-Reply-To: <8739f5tzxj.fsf@zancas.localnet> References: <8739f5tzxj.fsf@zancas.localnet> User-Agent: Notmuch/0.9_rc1-53-g97bfc01 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 07 Oct 2011 04:37:56 +0400 Message-ID: <87vcs1ljq3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch 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: Fri, 07 Oct 2011 00:38:04 -0000 On Thu, 06 Oct 2011 21:20:40 -0300, David Bremner wrote: > > I'd like to add a search term argument to notmuch dump (see > id:"87wrcijn1w.fsf@zancas.localnet" and followup for context). The > "notmuch" way would be to have > > notmuch dump > > do the right thing, and that is easy enough _except_ that > > notmuch dump foo > > writes the output to file foo. > > I see several options. > > 1) just delete the output file option from notmuch-dump, and use shell > redirection. So far I don't see a non-contrived example when writing > an output file directly is useful, but maybe that is just a failure > of imagination. > > 2) delete the output file option and a global "--write" option that > calls freopen(... stdout). As a bonus(?) this would work for any > notmuch command. > > 3) leave the output option alone and implement a --query=foo option for > notmuch dump. This would be the most backward compatible of course, > but also confusing for users. > > Thoughts? > IMHO 1[+2] is the way. It breaks the dump command interface, but would make it consistent with other commands. Implementing the second option (for all commands) is nice but independent and optional. Also, perhaps --output, --output-file or smth would a better name than --write. Regards, Dmitry > d > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch