unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* output file argument to notmuch dump.
@ 2011-10-07  0:20 David Bremner
  2011-10-07  0:37 ` Dmitry Kurochkin
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: David Bremner @ 2011-10-07  0:20 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]


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 <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?

d



[-- Attachment #2: Type: application/pgp-signature, Size: 315 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2011-10-16 23:25 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-07  0:20 output file argument to notmuch dump David Bremner
2011-10-07  0:37 ` Dmitry Kurochkin
2011-10-07  0:53   ` David Bremner
2011-10-07  1:43     ` Tom Prince
2011-10-07  1:14 ` Jameson Graef Rollins
2011-10-07 10:23 ` Jesse Rosenthal
2011-10-07 11:15   ` Tomi Ollila
2011-10-07 17:22     ` Jameson Graef Rollins
2011-10-10  7:32       ` Tomi Ollila
2011-10-09 16:01 ` David Bremner
2011-10-10 13:49   ` david
2011-10-10 13:49     ` [PATCH 1/6] test: update dump-restore to use redirection instead of filename args david
2011-10-10 13:49     ` [PATCH 2/6] test: add tests for command line arguments to notmuch-dump david
2011-10-10 13:49     ` [PATCH 3/6] notmuch-dump: update handling of file name argument david
2011-10-10 13:49     ` [PATCH 4/6] notmuch-dump: treat any remaining arguments after the filename as search terms david
2011-10-10 13:49     ` [PATCH 5/6] test: all dump-restore tests should be working now david
2011-10-10 13:49     ` [PATCH 6/6] notmuch-dump: deprecate use of output file argument david
2011-10-16 20:34     ` Thomas Schwinge
2011-10-16 23:25       ` Re: David Bremner
2011-10-10 13:59   ` output file argument to notmuch dump Tomi Ollila
2011-10-10 14:25     ` David Bremner
2011-10-10 16:41   ` Jameson Graef Rollins
2011-10-11  2:12     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).