Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-18 Thread David Edmondson
On Tue, 17 Jan 2012 15:32:11 -0500, Austin Clements amdra...@mit.edu wrote:
 Quoth David Edmondson on Jan 17 at  9:08 am:
  On Mon, 16 Jan 2012 15:16:24 -0700, Jeremy Nickurak jer...@nickurak.ca 
  wrote:
   On Mon, Jan 16, 2012 at 12:28, Austin Clements amdra...@mit.edu wrote:
Having deleted and spam as default settings in the configuration
file might be more reasonable.
   
   If I read correctly:
   
   1) If no exclude options are in the config file, none should be used.
  
  Yes.
  
   2) On notmuch setup, deleted and spam should be added to 
   .notmuch-config
  
  I might argue between 'should' and 'could', but the sense is correct.
 
 Oh, I think I see.  I don't know if I can do precisely that, since the
 config code doesn't know if it's being called from setup, but is
 something like this essentially what you're suggesting?
 
 if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) {
 if (is_new) {
 const char *tags[] = { deleted, spam };
 notmuch_config_set_auto_exclude_tags (config, tags, 2);
 } else {
 notmuch_config_set_auto_exclude_tags (config, NULL, 0);
 }
 }
 
 (where is_new is TRUE if this is a brand-new config file)

I'm not sure, as I haven't looked at the configuration code at
all, sorry.

Something must create the initial configuration file if none exists. I'd
be okay with that code adding 'deleted' and 'spam' to the excluded list.

This would mean that an existing user would see no change without taking
some action (adding the tags to the configuration file) and a new user
would see the new behaviour (automatic exclusion).

I'm not completely sure that automatically adding the exclusion of the
specified tags via the configuration file for new users is a great
idea. It seems as though it will lead to confusion for someone at some
point.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-18 Thread Jameson Graef Rollins
On Wed, 18 Jan 2012 08:38:23 +, David Edmondson d...@dme.org wrote:
 Something must create the initial configuration file if none exists. I'd
 be okay with that code adding 'deleted' and 'spam' to the excluded list.

 This would mean that an existing user would see no change without taking
 some action (adding the tags to the configuration file) and a new user
 would see the new behaviour (automatic exclusion).

What you describe is indeed how it currently works.  For new users or
old users who rerun setup, the config file will automatically include
the exclusions.  Otherwise, users will see no change.

 I'm not completely sure that automatically adding the exclusion of the
 specified tags via the configuration file for new users is a great
 idea. It seems as though it will lead to confusion for someone at some
 point.

Without any keys pre-bound to add deleted or spam tags, it probably
won't make much difference for new users.  And as long as it's
documented, users will be warned of the behavior.  Reading the config
file would also make it clear how the variable changes behavior.

jamie.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-18 Thread Jameson Graef Rollins
On Wed, 18 Jan 2012 09:52:52 +, David Edmondson d...@dme.org wrote:
 I agree that as long as no keys are pre-bound it will make little
 difference. That just transfers the discussion to the thread about
 adding the bindings, which seems silly.

I think that's ok.  The tag exclusion is in, which is great.  The
next question, of whether we should setup excludes by default, is
intimately related to whether or not we support key bindings to add
those tags.  So I think it's fine to transfer the rest of this
discussion to that thread.

jamie.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-17 Thread David Edmondson
On Mon, 16 Jan 2012 15:16:24 -0700, Jeremy Nickurak jer...@nickurak.ca wrote:
 On Mon, Jan 16, 2012 at 12:28, Austin Clements amdra...@mit.edu wrote:
  Having deleted and spam as default settings in the configuration
  file might be more reasonable.
 
 If I read correctly:
 
 1) If no exclude options are in the config file, none should be used.

Yes.

 2) On notmuch setup, deleted and spam should be added to .notmuch-config

I might argue between 'should' and 'could', but the sense is correct.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-17 Thread Austin Clements
Quoth David Edmondson on Jan 17 at  9:08 am:
 On Mon, 16 Jan 2012 15:16:24 -0700, Jeremy Nickurak jer...@nickurak.ca 
 wrote:
  On Mon, Jan 16, 2012 at 12:28, Austin Clements amdra...@mit.edu wrote:
   Having deleted and spam as default settings in the configuration
   file might be more reasonable.
  
  If I read correctly:
  
  1) If no exclude options are in the config file, none should be used.
 
 Yes.
 
  2) On notmuch setup, deleted and spam should be added to .notmuch-config
 
 I might argue between 'should' and 'could', but the sense is correct.

Oh, I think I see.  I don't know if I can do precisely that, since the
config code doesn't know if it's being called from setup, but is
something like this essentially what you're suggesting?

if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) {
if (is_new) {
const char *tags[] = { deleted, spam };
notmuch_config_set_auto_exclude_tags (config, tags, 2);
} else {
notmuch_config_set_auto_exclude_tags (config, NULL, 0);
}
}

(where is_new is TRUE if this is a brand-new config file)
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-16 Thread David Edmondson
On Sat, 14 Jan 2012 15:40:26 -0800, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 This patch looks fine.  Philosophical UI discussion to follow:
 
 On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements amdra...@mit.edu wrote:
  +if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) {
  +   const char *tags[] = { deleted, spam };
  +   notmuch_config_set_auto_exclude_tags (config, tags, 2);
  +}
 
 This creates the config section with the exclude list pre-set to
 deleted;spam.

I don't think that anything should be excluded from the search results
by default, at least not as a default behaviour of the 'notmuch'
binary.

Having deleted and spam as default settings in the configuration
file might be more reasonable.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-16 Thread Austin Clements
Quoth David Edmondson on Jan 16 at  9:12 am:
 On Sat, 14 Jan 2012 15:40:26 -0800, Jameson Graef Rollins 
 jroll...@finestructure.net wrote:
  This patch looks fine.  Philosophical UI discussion to follow:
  
  On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements amdra...@mit.edu 
  wrote:
   +if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) {
   + const char *tags[] = { deleted, spam };
   + notmuch_config_set_auto_exclude_tags (config, tags, 2);
   +}
  
  This creates the config section with the exclude list pre-set to
  deleted;spam.
 
 I don't think that anything should be excluded from the search results
 by default, at least not as a default behaviour of the 'notmuch'
 binary.
 
 Having deleted and spam as default settings in the configuration
 file might be more reasonable.

Sorry, I'm confused.  Are you saying deleted;spam should or should not
be the default?
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-16 Thread Jeremy Nickurak
On Mon, Jan 16, 2012 at 12:28, Austin Clements amdra...@mit.edu wrote:
 Quoth David Edmondson on Jan 16 at  9:12 am:
 Having deleted and spam as default settings in the configuration
 file might be more reasonable.

 Sorry, I'm confused.  Are you saying deleted;spam should or should not
 be the default?

If I read correctly:

1) If no exclude options are in the config file, none should be used.
2) On notmuch setup, deleted and spam should be added to .notmuch-config
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-16 Thread Jameson Graef Rollins
On Mon, 16 Jan 2012 15:18:18 -0700, Jeremy Nickurak not-m...@trk.nickurak.ca 
wrote:
 1) If no exclude options are in the config file, none should be used.
 2) On notmuch setup, deleted and spam should be added to .notmuch-config

That's correct.

jamie.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-14 Thread Jameson Graef Rollins
This patch looks fine.  Philosophical UI discussion to follow:

On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements amdra...@mit.edu wrote:
 +if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) {
 + const char *tags[] = { deleted, spam };
 + notmuch_config_set_auto_exclude_tags (config, tags, 2);
 +}

This creates the config section with the exclude list pre-set to
deleted;spam.  I personally have no problem with this, since I was
going to be setting exactly that anyway.  However, assuming we decide to
have this be the default in the CLI, should we therefore add support for
it in the emacs UI?  I've been going back and forth on this (as readers
are well aware), and have most recently rejected the idea that we should
add delete support to the emacs UI.  However, if we are excluding
deleted tags by default, then I'm going to go back and say that we
should include the keybindings to delete messages.  Comments?

If people think we should exclude deleted;spam by default, and agree
that we should also add delete support in the emacs UI, I'll go ahead
and rework my keybinding patches.

jamie.


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


Re: [PATCH v2 3/3] search: Support automatic tag exclusions

2012-01-14 Thread Austin Clements
Quoth Jameson Graef Rollins on Jan 14 at  3:40 pm:
 This patch looks fine.  Philosophical UI discussion to follow:
 
 On Fri, 13 Jan 2012 18:07:04 -0500, Austin Clements amdra...@mit.edu wrote:
  +if (notmuch_config_get_auto_exclude_tags (config, tmp) == NULL) {
  +   const char *tags[] = { deleted, spam };
  +   notmuch_config_set_auto_exclude_tags (config, tags, 2);
  +}
 
 This creates the config section with the exclude list pre-set to
 deleted;spam.  I personally have no problem with this, since I was
 going to be setting exactly that anyway.  However, assuming we decide to
 have this be the default in the CLI, should we therefore add support for
 it in the emacs UI?  I've been going back and forth on this (as readers
 are well aware), and have most recently rejected the idea that we should
 add delete support to the emacs UI.  However, if we are excluding
 deleted tags by default, then I'm going to go back and say that we
 should include the keybindings to delete messages.  Comments?

It's not that Emacs doesn't support the deleted tag.  You can always
+deletedRET, and this even seems like a pretty natural thing to do.
To me, the question is whether there should be a shortcut to do this.
I'm probably not one to answer this, since I don't plan to use the
deleted tag and hence using this binding would only ever be an
accident (though I will use the spam tag and I don't think I need a
binding for that; perhaps I would feel differently if my spam filters
were less effective).

 If people think we should exclude deleted;spam by default, and agree
 that we should also add delete support in the emacs UI, I'll go ahead
 and rework my keybinding patches.
 
 jamie.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch