Re: [notmuch] Initial tagging

2010-02-26 Thread Carl Worth
 Sometimes I manually override a rule-based tag.  If automatic tagging
 operated on old messages, overrides could be superseded.  When I add
 automatic tag rules, I first execute them manually and globally from the
 command line.

Right. With my global automatic tags, I don't want to be able to
override them, (and the fact that I *can* by adding/removing tags is a
bug---since, as you point out, the next run of my script will destroy my
changes). That's one of the reasons I want to switch to saved searches
for my own use of automatic tags.

Meanwhile, Martin has talked about having some machine-learning
algorithm apply tags, and have it notice when the user adds/removes
for feedback to improve its learning. So that kind of use case is
something that definitely isn't covered by saved searches.

  To do my global searches quickly, I do a similar subsetting, but it's
  much simpler. If I'm adding the notmuch tag I do and not
  tag:notmuch. We've even had the proposal of making notmuch tag do
  that automatically.
 
 That sounds like a good idea.  What happened with that proposal?

Like many other proposals, it's simply waiting for someone to implement
it.

 Saved searches is a very good idea.  I look forward to it.

Me too! :-)

-Carl



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


Re: [notmuch] Initial tagging

2010-02-26 Thread martin f krafft
also sprach Jameson Rollins jroll...@finestructure.net [2010.02.26.1600 
+0100]:
  Me too! :-)
 
 Isn't that what folders are?  At least that's what they seem to me.  I
 define a specific search, give it a name, and save it as a folder.

There's a 1:∞ relationship between folders and messages. I might
want a message associated with multiple contexts.

-- 
 .''`.   martin f. krafft madd...@d.o  Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
you know you're a hopeless geek when you misspell 'date' as 'data'
   -- branden robinson


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [notmuch] Initial tagging

2010-02-26 Thread micah anderson
On Thu, 25 Feb 2010 16:25:16 -0500, James Vasile ja...@hackervisions.org 
wrote:

 I'm curious as to what people are doing in this regard.

I am pretty good at evangelizing notmuch and converted another
person[0]... in doing so I realized I had to walk through a few issues
to get them started. 

The initial documentation for notmuch is really great, but the other
magical bits are missing, like holy cow all my email is in my inbox
now!; how do I deal with folders?; do i run notmuch new every
time?; do you auto-tag things?; how do you deal with attachments?;
how do you read encrypted email? etc. etc. all of these getting
started with notmuch things... including the script that James just
posted, the getmail tagging stuff that was posted a little while back,
etc. 

This stuff should go up on the wiki! There is a Tips and Tricks for
using notmuch with Emacs section, but more general things like James'
script and other people's scripts really should be put up there so
people who are new can figure out how to get started faster.

So this is just a call out to try and encourage people to put these
useful things that they have sent out to the list up onto the wiki! Most
people don't read all the past archives of a list when they first join,
but do check out the website for info on how to get going. I'm not
saying don't send things to the list either, just don't let the list be
the sink where these great tips go to die.

micah


0. indirectly I believe am also responsible, through 3rd party
evangelizing, for James entering the scene as well, and I'm happy about
that because I have been quite pleased with his enhancements, thanks
james!. now I just need to buy him a drink and talk him into fixing the
openpgp bits ;)


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


Re: [notmuch] Initial tagging

2010-02-26 Thread James Vasile
On Fri, 26 Feb 2010 20:33:08 -0500, micah anderson mi...@riseup.net wrote:
 
 Hey james,
 
 i really like your notmuch-retry bits, I've taken that shell script and
 integrated it into my tagging script, thanks! I'm curious if you are
 going to update your patch for notmuch.el (Calls to notmuch get queued
 and executed asynchronously) to use this, or if you are going to have
 those two continue to be separate ways of retrying?

Ah, I updated my local version and am putting it through its paces, but
it's already so much better that I should just send in the revised
patch.  I'll clean it up and do that tomorrow.

 Why do you tag new mail with tags, rather than construct folder searches
 to create views? 

I do a lot of on-the-fly searching and don't want to have to remember
notmuch's email address.  I suppose I could go to my notmuch folder and
then filter from there, but right now I'm much more likely to do M-x
notmuch-search/tag:notmuch and micah.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [notmuch] Initial tagging

2010-02-25 Thread Carl Worth
On Thu, 25 Feb 2010 16:25:16 -0500, James Vasile ja...@hackervisions.org 
wrote:
 I'm curious as to what people are doing in this regard.

I'm currently using a script that does tagging not entirely unlike
yours, (though my script isn't clever to retry a call to
notmuch---believe it or not I'm just calling it manually still, not from
cron).

 The tagging script uses the inbox tag to identify new mail, tags it
 according to criteria, then removes the inbox tag from anything it found
 a match for.  Uncategorized mail keeps the inbox tag so I can inspect it
 later and make rules for it (or tag it manually).

One distinction is that I have all of my notmuch tag commands operate
globally rather than just on new messages. One of the things that really
annoyed be about sup was that the support for automatic tagging worked
as a hook on messages as they were processed. So I couldn't use any of
the tags for searches prior to the time that I had added a particular
tag rule. I definitely didn't want to replicate that bug.

I also don't remove the inbox tag from matched mail, since I have a
notmuch-folders configuration that takes advantage of the matched tags
in concert with the inbox tag.

I've included my current auto-tagging script (notmuch-poll) below, as
well as the snippet of my .emacs that sets my notmuch-folders variable.

 Also, prepending tag:inbox and to search criteria restricts the
 tagging to a small subset of the db, which makes the tagging script run
 fairly quickly.  My unexpurgated tagging script has almost 100 rules for
 tagging, and I expect it to grow over time.

To do my global searches quickly, I do a similar subsetting, but it's
much simpler. If I'm adding the notmuch tag I do and not
tag:notmuch. We've even had the proposal of making notmuch tag do
that automatically.

Meanwhile, I'm planning on eventually moving entirely away from any tags
that are driven entirely by searches like this. Instead, I'd like to
just have good support for saved searches where we have some syntax to
perform string expansion on configured search terms. So where I'm
currently doing:

notmuch search tag:notmuch

I could instead do:

notmuch search query:notmuch

with a configuration associating notmuch to to:notmuchmail.org and
the above would expand to:

notmuch search '(' to:notmuchmail.org ')'

We've been talking about these saved searches for a while, but we
haven't implemented them yet, (nor decided firmly on the syntax we
want). I just noticed today that sup recently added a similar
saved-search feature with the following syntax:

notmuch search {notmuch}

I think I might like something like that with more custom syntax, (since
the existing prefix: syntax has a fairly standard meaning that doesn't
fit well with this new feature.

With saved-search support in notmuch, I could get rid of my notmuch-poll
script almost entirely, (I'd still want something to automatically
remove the -inbox tag from some messages, but that's about it).

-Carl

# notmuch-poll #
echo Importing new mail
notmuch new

echo Running global tag additions to tag new mail

# Tag bug-mail first, (since we use the bugs tag below)
notmuch tag +bugs from:bugzilla-daemon and not tag:bugs

# Note mail sent specifically to me (excluding bug mail)
notmuch tag +to-me to:cwo...@cworth.org and not tag:to-me and not tag:bugs
notmuch tag +to-me to:c...@theworths.org and not tag:to-me and not tag:bugs
notmuch tag +to-me to:carl.d.wo...@intel.com and not tag:to-me and not tag:bugs

# And note all mail sent from me
notmuch tag +sent from:cwo...@cworth.org and not tag:sent
notmuch tag +sent from:c...@theworths.org and not tag:sent
notmuch tag +sent from:carl.d.wo...@intel.com and not tag:sent

# Intel mail deserves some distinction
notmuch tag +intel to:carl.d.wo...@intel.com and not tag:intel
notmuch tag +intel from:intel.com and not tag:intel
notmuch tag +intel to:intel-gfx and not tag:intel
notmuch tag +intel to:linux-gfx and not tag:intel

# Next, various free-software projects tagged by recipient
notmuch tag +cairo to:cairographics.org and not tag:cairo
notmuch tag +cairo to:pix...@lists.freedesktop.org and not tag:cairo
notmuch tag +xorg-board to:foundation.x.org and not tag:xorg-board
notmuch tag +xorg to:xorg and not tag:xorg
notmuch tag +xorg to:xcb and not tag:xorg
notmuch tag +announce to:annou...@lists.debian.org and not tag:announce
notmuch tag +debian to:lists.debian.org and not tag:debian
notmuch tag +sup to:sup-de...@rubyforge.org and not tag:sup
notmuch tag +lca to:lists.lca2010.org.nz and not tag:lca
notmuch tag +notmuch to:notmuchmail.org and not tag:notmuch
notmuch tag +nickle to:nickle.org and not tag:nickle
notmuch tag +meego '( to:d...@moblin.org or to:d...@lists.moblin.org or 
to:meego-...@meego.com )' and not tag:meego

# Finally, a few subject-based tags
notmuch tag +intel subject:xf86-video-intel and not tag:intel
notmuch tag +sup subject:sup-talk and not tag:sup
notmuch tag +pdx subject:pdx 

Re: [notmuch] Initial tagging

2010-02-25 Thread James Vasile
On Thu, 25 Feb 2010 17:02:08 -0800, Carl Worth cwo...@cworth.org wrote:
 One distinction is that I have all of my notmuch tag commands operate
 globally rather than just on new messages. One of the things that really
 annoyed be about sup was that the support for automatic tagging worked
 as a hook on messages as they were processed. So I couldn't use any of
 the tags for searches prior to the time that I had added a particular
 tag rule. I definitely didn't want to replicate that bug.

Sometimes I manually override a rule-based tag.  If automatic tagging
operated on old messages, overrides could be superseded.  When I add
automatic tag rules, I first execute them manually and globally from the
command line.

 To do my global searches quickly, I do a similar subsetting, but it's
 much simpler. If I'm adding the notmuch tag I do and not
 tag:notmuch. We've even had the proposal of making notmuch tag do
 that automatically.

That sounds like a good idea.  What happened with that proposal?

 Meanwhile, I'm planning on eventually moving entirely away from any tags
 that are driven entirely by searches like this. Instead, I'd like to
 just have good support for saved searches where we have some syntax to
 perform string expansion on configured search terms. 

Saved searches is a very good idea.  I look forward to it.

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