[notmuch] A few patches

2010-03-01 Thread Mike Kelly
On Mon, 01 Mar 2010 14:13:05 +0100
"Sebastian Spaeth"  wrote:

> > > to count everything. Anyone have a better option for what the
> > > give-me-everything syntax should be?
> > 
> > notmuch count ''
> > 
> > The search patterns limit the matched messages/folders. An empty
> > pattern should match everything.
> 
> I agree that '' should work, but then I would expect to have '*' work
> as well. Is there a reason not to have both at the same time? Both
> make sense.

Try out this patch. It works both ways.

-- 
Mike Kelly

-- next part --
A non-text attachment was scrubbed...
Name: 0001-Support-notmuch-count-with-no-args-or.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: 

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: 



[notmuch] A few patches

2010-03-01 Thread Sebastian Spaeth
> > to count everything. Anyone have a better option for what the
> > give-me-everything syntax should be?
> 
> notmuch count ''
> 
> The search patterns limit the matched messages/folders. An empty pattern
> should match everything.

I agree that '' should work, but then I would expect to have '*' work as
well. Is there a reason not to have both at the same time? Both make sense.

Sebastian


Re: [notmuch] A few patches

2010-03-01 Thread Sebastian Spaeth
  to count everything. Anyone have a better option for what the
  give-me-everything syntax should be?
 
 notmuch count ''
 
 The search patterns limit the matched messages/folders. An empty pattern
 should match everything.

I agree that '' should work, but then I would expect to have '*' work as
well. Is there a reason not to have both at the same time? Both make sense.

Sebastian
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] A few patches

2010-02-27 Thread David Edmondson
On Fri, 26 Feb 2010 11:24:44 -0800, Carl Worth  wrote:
> Then, I'd like to have a new, succinct and explicit syntax to indicate a
> search that should return all results. For example, we could use '*' but
> that has the issue that it would need escaping from the shell. But the
> idea would be to be able to run:
> 
>   notmuch count '*'
> 
> to count everything. Anyone have a better option for what the
> give-me-everything syntax should be?

notmuch count ''

The search patterns limit the matched messages/folders. An empty pattern
should match everything.

dme.
-- 
David Edmondson, http://dme.org


[notmuch] A few patches

2010-02-26 Thread Carl Worth
Hi Mike, welcome to notmuch!

On Thu, 21 Jan 2010 15:42:00 -0500 (EST), "Mike Kelly"  
wrote:
> I've got a few patches available in my notmuch repo:
>
>   http://git.pioto.org/gitweb/notmuch.git

Thanks for sharing these! I really like how the distributed nature of
git makes it so easy for us to mix and match patches like this.

> The 'noarg-count' branch makes `notmuch count` without any argument
> simply return the total number of messages in the database. This seems
> like it could be useful.

The functionality does seem very useful, but I'd like it to be a tiny
bit more general. There are cases where it would be useful to return all
results from any the various search-based commands, (notmuch search,
notmuch show, etc.). But I think it would be unkind if "notmuch show"
with no arguments spewed the entire contents of the mail collection at
the user.

So what I would like to see is that any of these commands given no
argument would instead give some helpful information---I think it should
be either the information currently available in "notmuch help
search-terms" or perhaps an abbreviated version of it.

Then, I'd like to have a new, succinct and explicit syntax to indicate a
search that should return all results. For example, we could use '*' but
that has the issue that it would need escaping from the shell. But the
idea would be to be able to run:

notmuch count '*'

to count everything. Anyone have a better option for what the
give-me-everything syntax should be?

> The 'new-unread' branch makes `notmuch new` only tag messages as
> 'unread' if they don't have a maildir 'seen' flag. This shouldn't affect
> anyones existing database, but should make initial imports for people
> migrating from other mail setups (like me) go much better.

One of the longest-standing items on our TODO list has been to provide
proper support for these maildir flags. In fact, look at the top of our
current TODO file:

Fix the things that are causing the most pain to new users
--
1. A new import is tagging all messages as "inbox" -- total pain

There are various proposals and patches on the list already, and we need
to figure out exactly what we want, (it's easy to get bogged down once
we think about handling changes to these flags later, whether notmuch
should changes the maildir flag when the tags are changed,
etc.). Perhaps just starting with a patch like yours and going from
there is the right plan.

Would you please send it to the list so I've got a reminder about it
here, and can reply with any review?

Thanks,

-Carl


-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [notmuch] A few patches

2010-02-26 Thread Carl Worth
Hi Mike, welcome to notmuch!

On Thu, 21 Jan 2010 15:42:00 -0500 (EST), Mike Kelly pi...@pioto.org wrote:
 I've got a few patches available in my notmuch repo:

   http://git.pioto.org/gitweb/notmuch.git

Thanks for sharing these! I really like how the distributed nature of
git makes it so easy for us to mix and match patches like this.

 The 'noarg-count' branch makes `notmuch count` without any argument
 simply return the total number of messages in the database. This seems
 like it could be useful.

The functionality does seem very useful, but I'd like it to be a tiny
bit more general. There are cases where it would be useful to return all
results from any the various search-based commands, (notmuch search,
notmuch show, etc.). But I think it would be unkind if notmuch show
with no arguments spewed the entire contents of the mail collection at
the user.

So what I would like to see is that any of these commands given no
argument would instead give some helpful information---I think it should
be either the information currently available in notmuch help
search-terms or perhaps an abbreviated version of it.

Then, I'd like to have a new, succinct and explicit syntax to indicate a
search that should return all results. For example, we could use '*' but
that has the issue that it would need escaping from the shell. But the
idea would be to be able to run:

notmuch count '*'

to count everything. Anyone have a better option for what the
give-me-everything syntax should be?

 The 'new-unread' branch makes `notmuch new` only tag messages as
 'unread' if they don't have a maildir 'seen' flag. This shouldn't affect
 anyones existing database, but should make initial imports for people
 migrating from other mail setups (like me) go much better.

One of the longest-standing items on our TODO list has been to provide
proper support for these maildir flags. In fact, look at the top of our
current TODO file:

Fix the things that are causing the most pain to new users
--
1. A new import is tagging all messages as inbox -- total pain

There are various proposals and patches on the list already, and we need
to figure out exactly what we want, (it's easy to get bogged down once
we think about handling changes to these flags later, whether notmuch
should changes the maildir flag when the tags are changed,
etc.). Perhaps just starting with a patch like yours and going from
there is the right plan.

Would you please send it to the list so I've got a reminder about it
here, and can reply with any review?

Thanks,

-Carl




pgp4CT0ENSpMx.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] A few patches

2010-01-21 Thread Mike Kelly
I've got a few patches available in my notmuch repo:

  http://git.pioto.org/gitweb/notmuch.git

The 'noarg-count' branch makes `notmuch count` without any argument
simply return the total number of messages in the database. This seems
like it could be useful.

The 'new-unread' branch makes `notmuch new` only tag messages as
'unread' if they don't have a maildir 'seen' flag. This shouldn't affect
anyones existing database, but should make initial imports for people
migrating from other mail setups (like me) go much better.

-- 
Mike Kelly


[notmuch] A few patches

2010-01-21 Thread Mike Kelly
I've got a few patches available in my notmuch repo:

  http://git.pioto.org/gitweb/notmuch.git

The 'noarg-count' branch makes `notmuch count` without any argument
simply return the total number of messages in the database. This seems
like it could be useful.

The 'new-unread' branch makes `notmuch new` only tag messages as
'unread' if they don't have a maildir 'seen' flag. This shouldn't affect
anyones existing database, but should make initial imports for people
migrating from other mail setups (like me) go much better.

-- 
Mike Kelly
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch