* tags vs. show
@ 2015-08-08 15:25 Paul Tarvydas
2015-08-09 21:55 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Paul Tarvydas @ 2015-08-08 15:25 UTC (permalink / raw)
To: notmuch
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@me.com or from:xyz@me.com or cc:xyz@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: tags vs. show
2015-08-08 15:25 tags vs. show Paul Tarvydas
@ 2015-08-09 21:55 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2015-08-09 21:55 UTC (permalink / raw)
To: Paul Tarvydas, notmuch
Paul Tarvydas <paultarvydas@gmail.com> writes:
> Specifics (linux mint, emacs 24.3.1):
What version of notmuch?
> I run this tagging query at the command line:
>
> > notmuch tag +xyz -- '(to:xyz@me.com or from:xyz@me.com or
> > cc:xyz@me.com)'
fwiw, cc: is not a valid search prefix, but I don't think that's
your problem, since that would only effect your tagging step.
[snip]
> Then, I run on the command line:
>
> > notmuch show --format=mbox "tag:xyz" >xyz-all.txt
>
I tried a couple of tests here, and I could not duplicate your problem
with notmuch 0.20.2. For me, only messages with the tag show up.
You might want to try the following to debug:
- compare "notmuch count tag:xyz" with the number of messages recognized
by e.g. mutt in the mbox.
- if those two are the same, find one of the message you think should
not have the tag, and look at it by message-id.
- if the two are not the same, find a message in the mbox that you think
should not be there, and double check the tags and headers.
Note that
The to: prefix is used to match the names or addresses of any
recipient of an email message, (whether To, Cc, or Bcc).
to quote notmuch-search-terms(7). One possibility is the existence
of Bcc headers in some of your messages.
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-09 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-08 15:25 tags vs. show Paul Tarvydas
2015-08-09 21:55 ` 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).