tags vs. show

Paul Tarvydas paultarvydas at gmail.com
Sat Aug 8 08:25:30 PDT 2015


I'm having a problem with "notmuch show" producing too many results.

Can somebody tell me how to "notmuch show" only emails that a specific tag?


Specifics (linux mint, emacs 24.3.1):

I run this tagging query at the command line:

 > notmuch tag +xyz -- '(to:xyz at me.com or from:xyz at me.com or cc:xyz at me.com)'

In emacs, notmuch-hello, I search

   tag:xyz

and I get a buffer of emails that I expect.

Then, I run on the command line:

 > notmuch show --format=mbox "tag:xyz" >xyz-all.txt

the resulting xyz-all.txt contains many other emails (e.g. spam from 
linkedin, etc).


In the end, I want to create a new gmail account containing only the 
above tagged emails.  I will upload it with:

 > python imap_upload.py --gmail --box inbox --error Friends.err --user 
xyz --password xyz xyz-all.txt

I did this several years ago and see, from my scripts, that I had the 
same problem.  I worked around it by clearing tags, then creating an 
exclusion tag and tagging everything with that and, etc. ...  I would 
prefer to know how to do this exactly, this time.


Thanks in advance for any advice!

pt



More information about the notmuch mailing list