output file argument to notmuch dump.

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Thu Oct 6 17:37:56 PDT 2011


On Thu, 06 Oct 2011 21:20:40 -0300, David Bremner <bremner at unb.ca> wrote:
> 
> I'd like to add a search term argument to notmuch dump (see
> id:"87wrcijn1w.fsf at zancas.localnet" and followup for context). The
> "notmuch" way would be to have
> 
>     notmuch dump <search-term>
> 
> 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 at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list