Re: parallel test failures

2021-02-21 Thread Xu Wang
I did not look at logs, but I have had problem in other scenarios. The
way I debugged was to use strace to get a list of all files the tests
accessed. From that list I could recognize that some files that should
have been in separate temp directories were not thread-specific and
solution was to put the temp files in separate dir for each test. Not
sure if this is helpful, but wanted to share.

Kind regards and best of luck,

Xu

On Fri, Feb 19, 2021 at 7:24 AM David Bremner  wrote:
>
>
> I have intermittent failures when running the test suite on sufficiently
> parallel machines.  I have attached a log of such a failing build,
> although it does not seem especially illuminating.
>
> It takes anywhere from 5 to 300 runs to get a failure for me running on
> 60 hardware threads (30 cores). At least on this machine the number of
> tests that pass seems consistent at 1205
>
> ___
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-le...@notmuchmail.org
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Using Xapian synonyms with notmuch

2019-05-30 Thread Xu Wang
I have some contacts who go by several names (mostly people who use
their native name in addition to sometimes using a name easier to
pronounce for others; but also some secret agents). I often want to do
something like "from:James" and where notmuch gives me back results
with emails from "James", "Jimmy" and from "Jaime".

I have done searching and found some relevant threads:

https://notmuchmail.org/pipermail/notmuch/2013/015571.html
https://xapian.org/docs/synonyms.html
https://getting-started-with-xapian.readthedocs.io/en/latest/howtos/synonyms.html

However, they are very technical for me. It is not possible to just
put something in .notmuch-config that specifies synonyms so that
notmuch will build the Xapian database with those aliases?

By the way, I don't know Xapian at all or how to call it manually. I
have very simple .notmuch-config and I don't have any deep
understanding or programming experience.

Kind regards,

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


Re: find threads where I and Jian participated but not Dave

2017-06-13 Thread Xu Wang
ooo that is nice also. I will look into that. I think it is a good
approach. Kind regards to everyone! Xu

On Tue, Jun 13, 2017 at 7:31 PM, David Bremner <da...@tethera.net> wrote:
> Xu Wang <xuwang...@gmail.com> writes:
>
>> I bump this. Actually more simple than that, how to search for thread
>> in which I have participated and Jian has participated? Excluding
>> threads in which Dave participated is perhaps more complicated.
>
> I don't know of an efficient way to do this. You could write a script
> something like
>
> notmuch search --output=threads from:Xu  > A
> notmuch search --output=threads from:Jian  > B
> comm -12 A B
>
> I think the output is sorted, but you might also have to sort A and B
>
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: find threads where I and Jian participated but not Dave

2017-06-13 Thread Xu Wang
I bump this. Actually more simple than that, how to search for thread
in which I have participated and Jian has participated? Excluding
threads in which Dave participated is perhaps more complicated.

kind regards,

Xu

On Sat, Jan 9, 2016 at 4:55 PM, Xu Wang <xuwang...@gmail.com> wrote:
> Has someone a notmuch-based script by which to search for threads in
> which I have participated and Jian has participated, but Dave has not
> participated?
>
> Kind regards,
>
> Xu
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: ask notmuch to find back "reply-to's"

2016-07-03 Thread Xu Wang
On Sun, Jul 3, 2016 at 9:28 AM, Daniel Kahn Gillmor
<d...@fifthhorseman.net> wrote:
> On Sat 2016-07-02 20:28:41 -0400, Xu Wang wrote:
>> Hello all,
>>
>> I have a situation where sometimes I sync a later message. For
>> example, the following happens on times:
>>
>> 1a. sync message 1.
>> 1b. not much new
>> 2a. sync message 3 (which replied to message 2)
>> 2b. not much new
>> 3. sync message 2 (which replied to message 1)
>> 3b. not much new
>>
>> This happens because of my workflow of offlineimap. It takes a long
>> time to sync some folders so often I prefer to skip, but sometimes
>> they contain replies.
>
> on most systems, assuming standard headers, notmuch should indeed
> assemble these into the same thread.
>
> the relevant headers are In-Reply-To and References.
>
> Can you show those headers for this example?  If they have these message-IDs:
>
>  message 1: XXX
>  message 2: YYY
>  message 3: ZZZ
>
> then i'd expect the following headers:
>
>  message 1:
>Message-Id: XXX
> 
>  message 2:
>Message-Id: YYY
>In-Reply-To: XXX
>References: XXX
>  message 3:
>Message-Id: ZZZ
>In-Reply-To: YYY
>References: XXX, YYY
>
>
> If notmuch has indexed them all, they should all be part of the same
> thread.

Ah good to know! I will keep eye out for this issue to pop up. I don't
have it now since I performed a clean notmuch new to build database.

Thank you for detailed response!!

Kind regards,

Xu

>
> --dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


ask notmuch to find back "reply-to's"

2016-07-02 Thread Xu Wang
Hello all,

I have a situation where sometimes I sync a later message. For
example, the following happens on times:

1a. sync message 1.
1b. not much new
2a. sync message 3 (which replied to message 2)
2b. not much new
3. sync message 2 (which replied to message 1)
3b. not much new

This happens because of my workflow of offlineimap. It takes a long
time to sync some folders so often I prefer to skip, but sometimes
they contain replies.

When I do that, notmuch does not correctly construct the linkages. I
think this is understandable and I blame my workflow more than
notmuch. notmuch wants to be as fast as possible so when it processes
message 2 in step 3b, it does not check message 3 because it already
checked message 3 in 2b so I think it skips it. Do I have correct
understanding of the situation?

Is there a config setting that I can put to ask notmuch to look both
ways (even at cost of spending more time)? i.e. I want notmuch in step
3b to search through all previous messages to see if they replied to
it.

Kind regards,

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


Re: Search for "has an attachment"

2016-05-10 Thread Xu Wang
On Tue, May 10, 2016 at 3:37 AM, Mark Walters <markwalters1...@gmail.com> wrote:
>
> Hi
>
> On Tue, 10 May 2016, Xu Wang <xuwang...@gmail.com> wrote:
>> Hi,
>>
>> I would like to search for messages from Jiang that have an attachment. I 
>> tried
>>
>> from:Jiang attachment:
>> from:Jiang attachment:*
>> from:Jiang attachment:.*
>>
>> and none seems to do what I want.
>>
>> Perhaps the problem is that I want to search for "real' attachments
>> (e.g. not the multipart email things that are really the message).
>
> Does from:Jiang and tag:attachment do what you want?
>
> Best wishes
>
> Mark

It does works! Thank you, Mark!

Kind regards,

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


Search for "has an attachment"

2016-05-09 Thread Xu Wang
Hi,

I would like to search for messages from Jiang that have an attachment. I tried

from:Jiang attachment:
from:Jiang attachment:*
from:Jiang attachment:.*

and none seems to do what I want.

Perhaps the problem is that I want to search for "real' attachments
(e.g. not the multipart email things that are really the message).

Kind regards,

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


find threads where I and Jian participated but not Dave

2016-01-09 Thread Xu Wang
Has someone a notmuch-based script by which to search for threads in
which I have participated and Jian has participated, but Dave has not
participated?

Kind regards,

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


Re: Query to get emails from notmuch mailing list?

2015-12-04 Thread Xu Wang
On Fri, Dec 4, 2015 at 10:08 AM, Tomi Ollila <tomi.oll...@iki.fi> wrote:
> On Fri, Dec 04 2015, Xu Wang <xuwang...@gmail.com> wrote:
>
>> On Thu, Dec 3, 2015 at 3:41 PM, Tomi Ollila <tomi.oll...@iki.fi> wrote:
>>> On Thu, Dec 03 2015, David Bremner <da...@tethera.net> wrote:
>>>
>>>> Damien Cassou <dam...@cassou.me> writes:
>>>>
>>>>> Hi,
>>>>>
>>>>> how do you write a notmuch query to get all emails of the notmuch
>>>>> mailing list?
>>>>>
>>>>
>>>> at one point I use
>>>>
>>>> notmuch tag +inbox::notmuch tag:inbox and '(' to:notmuch or folder:notmuch 
>>>> ')'
>>>>
>>>> just now I noticed the folder:notmuch is not matching anything because
>>>> of reorganization, so it's really to:notmuch; that seems to work for me.
>>>
>>> wouldn't to:notmuch@notmuchmail.org be more accurate ?
>>
>> Probably also CC? I don't know how to search for To or CC though.
>
> to: covers [Cc][Cc]: too :D

Excellent to know. In that case I wonders how to do only CC or only
To: although I have not a user case.

Kind regards,

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


Re: Query to get emails from notmuch mailing list?

2015-12-03 Thread Xu Wang
On Thu, Dec 3, 2015 at 3:41 PM, Tomi Ollila  wrote:
> On Thu, Dec 03 2015, David Bremner  wrote:
>
>> Damien Cassou  writes:
>>
>>> Hi,
>>>
>>> how do you write a notmuch query to get all emails of the notmuch
>>> mailing list?
>>>
>>
>> at one point I use
>>
>> notmuch tag +inbox::notmuch tag:inbox and '(' to:notmuch or folder:notmuch 
>> ')'
>>
>> just now I noticed the folder:notmuch is not matching anything because
>> of reorganization, so it's really to:notmuch; that seems to work for me.
>
> wouldn't to:notmuch@notmuchmail.org be more accurate ?

Probably also CC? I don't know how to search for To or CC though.

Kind regards,

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


Re: correct way to search for only PDF attachments

2015-09-30 Thread Xu Wang
On Tue, Sep 29, 2015 at 9:48 AM, David Bremner  wrote:
> Suvayu Ali  writes:
>
>> On Tue, Sep 29, 2015 at 08:00:18AM -0300, David Bremner wrote:
>>>
>>> Of course it is getting pretty big, I don't know what to do about
>>> that.
>>
>> How about an overview in notmuch-search-terms with more detailed docs in
>> an info page?  coreutils does this.  I don't think this will add any new
>> build dependencies either, as sphinx supports info pages.  I see
>> texinfo_documents is already defined in doc/conf.py.  Maybe that is an
>> option?
>>
>
> I'm not really in favour of requiring anyone who is not already using
> emacs to use info.  Of course we could provide the same long form docs
> in other formats (most likely html).  I don't know if splitting into
> shorter man pages plus a longer manual would really help, but it's
> likely we could take better advantage of sphinx. I know that Patrick
> Totzke started a rework of the docs
>
>https://github.com/pazz/notmuch/tree/docs
>
> I don't think that's really in a state to contemplate merging (for one
> thing it hasn't kept up with doc changes in master); but maybe somebody
> wants to pick up where Patrick left off.
>
> d
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Thank you everyone for all of the information and for walking me in
through the example!

I will study more in depth and look at the detailed documentation.

Kind regards,

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


Re: correct way to search for only PDF attachments

2015-09-28 Thread Xu Wang
On Mon, Sep 28, 2015 at 10:00 PM, Carl Worth <cwo...@cworth.org> wrote:
> On Mon, Sep 28 2015, Xu Wang wrote:
>> I would look to look for all emails from a colleague jongho. I tried:
>>
>> from:jongho attachment:pdf
>>
>> which seems to do as I wanted.
>
> Good. That should work.
>
>> To understand more, what does the following search for?
>>
>> from:jongho attachment:.*pdf
>
> Uhm, probably only strange things. There are some mechanisms for getting
> notmuch to emit some debugging information on what the final search
> terms end up being, (but I don't recall if they still require
> recompilation or not).
>
> I'm not testing now, but I wouldn't be surprised if that ended up doing
> something like searching for a phrase like "attachment pdf" anywhere
> within a message. (The Xapian parser can be somewhat unpredictable when
> you give it unexpected input.)
>
>> Also, how does the first one above know that I want only PDF
>> attachments and not an attachment called "pdformula.txt" ?
>
> It doesn't know that you want only PDF attachments. The key part is that
> the indexing is performed by breaking text up into individual terms, (at
> punctuation boundaries usually). So a search specification like
> "attachment:pdf" is searching for things that were indexed with the
> "pdf" term within the attachment prefix. So that won't match a filename
> like pdformula.txt, (which would be indexed as two terms, "pdformula"
> and "txt"), but it would match pdf.ormula.txt, (which would be indexed
> as three terms, "pdf", "ormula" and "txt").
>
> The Xapian documentation can be examined if you want more details.

This is highly useful. Thank for such an explanation!! Thank you, Carl.

Kind regards,

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


correct way to search for only PDF attachments

2015-09-28 Thread Xu Wang
Hi,

I would look to look for all emails from a colleague jongho. I tried:

from:jongho attachment:pdf

which seems to do as I wanted.

To understand more, what does the following search for?

from:jongho attachment:.*pdf

I know it is incorrect as the results tell me, but what exactly does it do?

Also, how does the first one above know that I want only PDF
attachments and not an attachment called "pdformula.txt" ?

Kind regards,

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


Re: Possible some threads are not complete due to bug?

2015-09-23 Thread Xu Wang
On Wed, Sep 23, 2015 at 6:44 PM, David Bremner <da...@tethera.net> wrote:
> Xu Wang <xuwang...@gmail.com> writes:
>
>> Because when I do a notmuch search for that message by message ID with
>> --output=threads, it gives a different thread ID.
>>
>>> Isn't that what your first command tells you?
>> Well yes, but I wanted to confirm that that is indeed the reason. I
>> have heard in someone saying that debugging is process of confirming
>> things that should be true.
>
> I'm still confused. It sounds like you gave the same command twice and
> got different answers. Can you maybe show the complete sequence of
> commands and output (assuming it's not too large)?

Dear David, thank you for your kind persistence. I apologize for the
lack of clarity in my writing. Below is the full sequence of commands
(I just subsitute MYMSGID and MYMSGIDREPLY for two message IDs) as
well as my thought process.

$ notmuch search --output=threads "id:MYMSGID"
thread:a125
$ notmuch search --output=messages "thread:a125"
id:MYMSGID
$
# I know that MYMSGIDREPLY did respond to that message. I have it in
my mutt mailbox and it shows the down-right arrow signifying this. I
inspect the headers and there is indeed a header in MYMSGIDREPLY that
says "In-Reply-To: ". I then do...
$ notmuch search --output=threads "id:MYMSGIDREPLY"
thread:c125
$ notmuch search --output=messages "thread:c125"
id:MYMSGIDREPLY
$

# What I expected (and did not get) was the following output:
$ notmuch search --output=threads "id:MYMSGID"
thread:a125
$ notmuch search --output=messages "thread:a125"
id:MYMSGID
id:MYMSGIDREPLY
$

# after regenerating the notmuch database, I did indeed get the output
that I expected.

Kind regards,

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


Re: Possible some threads are not complete due to bug?

2015-09-20 Thread Xu Wang
On Sat, Sep 19, 2015 at 12:02 PM, David Bremner <da...@tethera.net> wrote:
> Xu Wang <xuwang...@gmail.com> writes:
>
>> Sometimes I need to do:
>>
>> $ notmuch search --output=threads "id:MYMSGID"
>> thread:a125
>> $ notmuch search --output=messages "thread:a125"
>>
>> In theory, this should output the message that responded to message ID
>> "MYMSGID". Sometimes it works. But sometimes it does not work. That
>> is, there exists an email where I am sure (I checked the raw email)
>> that there is a header
>> In-Reply-To: 
>> but that email does not show when I do the two commands above.
>
> I'm not 100% sure what you mean by "does not show". Do you mean that the
> output from the second command is empty? or does not contain MYMSGID?

That was poor formatting on my part. It only was outputting the id I
put into the first command. So it only showed
id:MYMSGID

>> Indeed, that mail belongs to a different thread ID.
>
> How can you tell that the mail belongs to a different thread?

Because when I do a notmuch search for that message by message ID with
--output=threads, it gives a different thread ID.

> Isn't that what your first command tells you?
Well yes, but I wanted to confirm that that is indeed the reason. I
have heard in someone saying that debugging is process of confirming
things that should be true.

Kind regards,

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


Re: Possible some threads are not complete due to bug?

2015-09-13 Thread Xu Wang
On Sun, Sep 13, 2015 at 2:19 AM, Suvayu Ali <fatkasuvayu+li...@gmail.com> wrote:
> Hi,
>
> You should include a reference to the original message, not everyone
> will remember the thread.
>
>   id:20150614082258.gd17...@chitra.no-ip.org or
>   <http://mid.gmane.org/20150614082258.gd17...@chitra.no-ip.org>

Ah yes thank you.

> On Sun, Sep 13, 2015 at 12:03:20AM -0400, Xu Wang wrote:
>>
>> Sometimes I need to do:
>>
>> $ notmuch search --output=threads "id:MYMSGID"
>> thread:a125
>> $ notmuch search --output=messages "thread:a125"
>
> Looking at the script again, I see I assumed a message will belong to a
> single thread.  You can remove that assumption by applying the following
> change.
>
> -8<8<-
> diff -u nm-ack nm-ack
> --- nm-ack  2015-06-15 01:30:40.327556510 +0200
> +++ nm-ack  2015-09-13 07:58:30.734096931 +0200
> @@ -10,8 +10,9 @@
>  # debug
>  # set -o xtrace
>
> -declare query="$1" thread=$(notmuch search --output=threads -- "$1")
> -declare -a msgs=$(notmuch search --output=messages -- "$thread") responses
> +declare query="$1"
> +declare -a thread=$(notmuch search --output=threads -- "$1")
> +declare -a msgs=$(notmuch search --output=messages -- "${thread[@]}") 
> responses
>
>  function strip_mid() {
>  sed -e 's/ \+//g' -e 's/<\([^ <>]\+\)>/\1/g'
> ->8>8-
>
>> In theory, this should output the message that responded to message ID
>> "MYMSGID". Sometimes it works. But sometimes it does not work. That
>> is, there exists an email where I am sure (I checked the raw email)
>> that there is a header
>> In-Reply-To: 
>> but that email does not show when I do the two commands above.
>> Indeed, that mail belongs to a different thread ID.
>>
>> I am just curious if the above is due to:
>>
>> 1. My missing of understanding of how notmuch deals with threads
>> 2. A bug or missing feature in notmuch causes some threads to be incomplete
>
> Interesting issue.  I can think of a case, say a message is cross-posted
> to multiple lists, it might then give you more than one thread ids.  Is
> this the case for your message?  If you are up for it, look in
> lib/thread.cc.  I think the relevant methods are:
> _resolve_thread_relationships and _notmuch_thread_create, but I could be
> wrong.  I'm not familiar with the notmuch source.
>
> As I recall, you are using mutt-kz; does  work from
> mutt-kz?  I would expect that to fail too.  It gets the thread id like
> this:
>
>   id = notmuch_message_get_thread_id(msg);
>
> Hope this helps,

Thanks so very much as always Suvayu. I learn a great amount of
knowledge from you.
I tried the fixes and nothing changed. The message IDs had different
threads.  did not work in mutt-kz. However, when I
viewed [all mail] (from Gmail) so that the messages were in the same
mailbox, mutt recognized they were a thread (in the sense of the
down-right arrow signifying a reply).

In the end, I removed the .notmuch folder and ran 'notmuch new' to
regenerate everything. This worked! However I am wondering why I had
to do that. Is there any case where doing a complete refresh should be
done as opposed to "notmuch new" (which I do all the time)?
It appears that thread detection works different when adding messages
as opposed to a complete refresh?

Kind regards,

Xu

> --
> Suvayu
>
> Open source is the future. It sets us free.
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Possible some threads are not complete due to bug?

2015-09-12 Thread Xu Wang
Hi,

Sometimes I need to do:

$ notmuch search --output=threads "id:MYMSGID"
thread:a125
$ notmuch search --output=messages "thread:a125"

In theory, this should output the message that responded to message ID
"MYMSGID". Sometimes it works. But sometimes it does not work. That
is, there exists an email where I am sure (I checked the raw email)
that there is a header
In-Reply-To: 
but that email does not show when I do the two commands above.
Indeed, that mail belongs to a different thread ID.

I am just curious if the above is due to:

1. My missing of understanding of how notmuch deals with threads
2. A bug or missing feature in notmuch causes some threads to be incomplete

By the way, my goal is to use Suvayu's script to check if a message
was responded to.

Kind regards,

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


Searching for phrases in the body of an email

2015-07-18 Thread Xu Wang
On Sat, Jul 18, 2015 at 11:32 AM, Suvayu Ali
 wrote:

> Of course this does not help me solve my original goal, but I guess now
> I can try different queries based on your idea.

Ah I see. Your goal is to search for phrases close to "no plain text".
But if you use fuzzy searching but an exact grep, then it is normal
that the numbers are not consistent, no? Because your grep is not
fuzzy.

Kind regards,

Xu


Searching for phrases in the body of an email

2015-07-18 Thread Xu Wang
On Sat, Jul 18, 2015 at 5:11 AM, Suvayu Ali  
wrote:
> Hi Lewis,
>
> On Fri, Jul 17, 2015 at 10:48:57AM -0500, J. Lewis Muir wrote:
>>
>> 1. Perhaps you are remembering the "no plain text" message incorrectly?
>>For example, the message could have referred to "text/plain" or
>>"plaintext" (no space).  These would be sufficiently different to not
>>match your grep pattern.
>
> True, but my puzzlement is notmuch shouldn't return those results in the
> first place, since I provided a quoted string: "plain text", unless of
> course I need to escape the quotes.  Okay, just checked it, doesn't make
> a difference in the number of hits from notmuch.
>
>> 2. Perhaps your email client rendered the "no plain text" message when
>>it encountered an email with only a "text/html" content type?  In
>>this case, the "no plain text" (or whatever) message would not be
>>present in the email itself since it would be generated by the email
>>client when rendering the email.
>
> This is possible, but I use mutt.  As far as I know, it doesn't do
> "smart" things like that.  I also recall looking at the mime parts
> individually as I was surprised at the behaviour, and it was indeed a
> useless text/plain part with that message.
>
>> 3. A really long shot, but could a line wrap have occurred after "plain"
>>such that "text" appeared on the next line?  Your grep pattern would
>>not match that.
>
> Good point, I tried grepping for this instead: 'plain[[:space:]/]+text',
> no luck.
>
> Thanks for your comments.
>
> Cheers,
>
> --
> Suvayu

Hi Suvayu,

First note that I believe notmuch search is case insensitive by
default, so your grep should be case insensitive as well.

More importantly, I'm not sure how 'no NEAR "plain text" ' syntax is
parsed. Maybe it is parsed as {no NEAR plain} or {text}.

You would like to search for the exact phrase, correct? How about the
following?

notmuch search no adj plain adj text

Best,

Xu


Re: Searching for phrases in the body of an email

2015-07-18 Thread Xu Wang
On Sat, Jul 18, 2015 at 5:11 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:
 Hi Lewis,

 On Fri, Jul 17, 2015 at 10:48:57AM -0500, J. Lewis Muir wrote:

 1. Perhaps you are remembering the no plain text message incorrectly?
For example, the message could have referred to text/plain or
plaintext (no space).  These would be sufficiently different to not
match your grep pattern.

 True, but my puzzlement is notmuch shouldn't return those results in the
 first place, since I provided a quoted string: plain text, unless of
 course I need to escape the quotes.  Okay, just checked it, doesn't make
 a difference in the number of hits from notmuch.

 2. Perhaps your email client rendered the no plain text message when
it encountered an email with only a text/html content type?  In
this case, the no plain text (or whatever) message would not be
present in the email itself since it would be generated by the email
client when rendering the email.

 This is possible, but I use mutt.  As far as I know, it doesn't do
 smart things like that.  I also recall looking at the mime parts
 individually as I was surprised at the behaviour, and it was indeed a
 useless text/plain part with that message.

 3. A really long shot, but could a line wrap have occurred after plain
such that text appeared on the next line?  Your grep pattern would
not match that.

 Good point, I tried grepping for this instead: 'plain[[:space:]/]+text',
 no luck.

 Thanks for your comments.

 Cheers,

 --
 Suvayu

Hi Suvayu,

First note that I believe notmuch search is case insensitive by
default, so your grep should be case insensitive as well.

More importantly, I'm not sure how 'no NEAR plain text ' syntax is
parsed. Maybe it is parsed as {no NEAR plain} or {text}.

You would like to search for the exact phrase, correct? How about the
following?

notmuch search no adj plain adj text

Best,

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


Re: Searching for phrases in the body of an email

2015-07-18 Thread Xu Wang
On Sat, Jul 18, 2015 at 11:32 AM, Suvayu Ali
fatkasuvayu+li...@gmail.com wrote:

 Of course this does not help me solve my original goal, but I guess now
 I can try different queries based on your idea.

Ah I see. Your goal is to search for phrases close to no plain text.
But if you use fuzzy searching but an exact grep, then it is normal
that the numbers are not consistent, no? Because your grep is not
fuzzy.

Kind regards,

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


search query "replytoid:"

2015-06-14 Thread Xu Wang
On Sun, Jun 14, 2015 at 4:22 AM, Suvayu Ali <fatkasuvayu+linux at gmail.com> 
wrote:
> On Sat, Jun 13, 2015 at 10:55:52PM +0200, Suvayu Ali wrote:
>> On Sat, Jun 13, 2015 at 02:47:00PM -0400, Xu Wang wrote:
>> >
>> > Is it possible to search based on which message ID a message
>> > *responds* to? For example, suppose message id is MESSAGEID. I want to
>> > find all emails that responded to MESSAGEID. How to enter such a query
>> > into notmuch?
>>
>> AFAIK, this is not possible.  Notmuch does not allow searching special
>> headers.  You could probably write a script using the threads output
>> format to get the thread, and then use formail to find the responses.
>
> Try the attached script.  It accepts notmuch queries by message id.
> E.g. to get the responses to your OP, you can do:
>
>   $ ./nm-ack id:CAJhTkNhYew6H-bptACTew3gN3DLWg6agTYu8hAkdwFS=z4VFWg at 
> mail.gmail.com
>   id:877fr79upd.fsf at maritornes.cs.unb.ca id:20150613205552.GC17381 at 
> chitra.no-ip.org
>
> The first one is David's response, the second one is mine.
>
> Hope this helps,
>
> --
> Suvayu

These are exactly what I was looking for! I tried Suvayu's script with
success, and although I did not try the script referenced by David's
email, the goal is exactly my goal and thus it seems it should do as I
would like as well.

Thank you so very much to you for persisting in helping me, even
despite the lack of clarity in my messages. I highly appreciate you
and your time.

Happy regards,

Xu


Understanding the "replied" tag

2015-06-14 Thread Xu Wang
Dear Suvayu and Austin,

Thank you for your attempts to understand my goals. I apologize for
the lack in the clarity of my previous messages. Thank you kindly for
your persistence and thank you to Suvayu for suggestions on adding
more information.

I am indeed using mutt-kz, along with offlineimap, on Ubuntu 15.04. I
have written the following information the other email thread I
started (perhaps I should have added it as a reply here, but I thought
it might be sufficiently a different topic). I will copy the
information I gave there on my goal here:

My goal is to do something like the following:
notmuch search tag:reply-required and not tag:replied

which was discussed here:
http://notmuchmail.org/pipermail/notmuch/2010/002558.html

However, instead of conditioning on tag:reply-required, I would like
to look at this for a specific message. For example, if I write an
important message, I can do the following:
save the message id, and then in 5 days set a cron script to check
whether my message was responded to. If it was not responded to I will
take some action to notify myself (haven't decided what yet).
It is the "If it was not responded to" part that this email thread is
about. I am now realizing that I cannot use mutt's tag "replied"
because I often send and read email from gmail or other IMap clients
(e.g. phone). Because of this (I believe), the reply tag does not get
set when it should (well not "should" but rather "when I want it to").
For example, I often have

abc
->def
  -> ghi

where the message def does not have the "replied" tag, even though it
was replied to (ghi replied to it). I think the reason is what I
suggested above. Yes, indeed Austin was correct about where my
misunderstanding was. I do indeed want to see if *any* reply was to a
certain message id, but the "replied" tag is apparently for my own
replying.

Because I cannot use the "replied" tag (unless I have misunderstood),
I thought I could just check using the message id with 'notmuch search
repliedto:', but Suvayu points out that searching for this
is not supported.

Kind regards,

Xu

On Sat, Jun 13, 2015 at 7:12 PM, Austin Clements
 wrote:
> Hi Xu. I may be misunderstanding your email, but it sounds like you want to 
> know if a message has *any* reply message. That's not what the replied tag 
> indicates. The replied tag indicates that *you* have sent a reply to a 
> message. Mechanically, when you hit, say, r to start a reply and then send 
> that message, notmuch tags the message you hit r on as "replied". That's the 
> only time notmuch automatically sets this tag.
>
> On June 11, 2015 10:25:44 AM PDT, Xu Wang  wrote:
>>Dear all,
>>
>>First, I am extremely excited to be a part of this list now. notmuch
>>has really helped me. Thank you go all individuals working to improve
>>it and to help others to know how to use it.
>>
>>I would really like to know if a message has been replied to (e.g.
>>using a certain message id). It seems that all I need to do is check
>>for the "replied" tag. But often this tag is not there, even when
>>there has been a reply (I have confirmed this through the thread
>>display and checking the message that replied to the message to make
>>sure it indeed has header "replied-to:").
>>
>>I have looked in mutt, and also I see many situations where there is
>>no 'r' flag, especially for emails sent from me.
>>
>>The following returns true:
>>notmuch config get maildir.synchronize_flags
>>
>>So at least both are giving same answer, but I'm not sure why not
>>saying "replied" thread is correct.
>>
>>What is incorrect for my way of thinking about "replied"? Do I
>>misunderstand what it is supposed to do or am I not updating the flags
>>correctly?
>>
>>Kind regards,
>>
>>Xu
>>___
>>notmuch mailing list
>>notmuch at notmuchmail.org
>>http://notmuchmail.org/mailman/listinfo/notmuch
>


search query "replytoid:"

2015-06-14 Thread Xu Wang
On Sat, Jun 13, 2015 at 5:14 PM, David Bremner  wrote:
> Xu Wang  writes:
>
>> Dear all,
>>
>> Is it possible to search based on which message ID a message
>> *responds* to? For example, suppose message id is MESSAGEID. I want to
>> find all emails that responded to MESSAGEID. How to enter such a query
>> into notmuch?
>
> Threads aren't exactly the concept you ask for, because the include the
> messages before the message-id in question as well. Nonetheless, maybe
> the following helps:
>
>
> % notmuch show $(notmuch search --output=threads $MESAGEID)
>
> or
>
> % notmuch search --output=messages $(notmuch search --output=threads 
> $MESAGEID)

Dear David and Suvayu,

Thank you for your ideas. My goal is to do something like the following:
notmuch search tag:reply-required and not tag:replied

which was discussed here:
http://notmuchmail.org/pipermail/notmuch/2010/002558.html

However, instead of conditioning on tag:reply-required, I would like
to look at this for a specific message. For example, if I write an
important message, I can do the following:
save the message id, and then in 5 days set a cron script to check
whether my message was responded to. If it was not responded to I will
take some action to notify myself (haven't decided what yet).
It is the "If it was not responded to" part that this email thread is
about. I am now realizing that I cannot use mutt's tag "replied"
because I often send and read email from gmail or other IMap clients
(e.g. phone). Because of this (I believe), the reply tag does not get
set when it should (well not "should" but rather "when I want it to").
For example, I often have

abc
->def
  -> ghi

where the message def does not have the "replied" tag, even though it
was replied to (ghi replied to it). I think the reason is what I
suggested above.

Because I cannot use the "replied" tag (unless I have misunderstood),
I thought I could just check using the message id with 'notmuch search
repliedto:', but Suvayu points out that searching for this
is not supported.

Kind regards,

Xu


Re: search query replytoid:blah

2015-06-14 Thread Xu Wang
On Sun, Jun 14, 2015 at 4:22 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:
 On Sat, Jun 13, 2015 at 10:55:52PM +0200, Suvayu Ali wrote:
 On Sat, Jun 13, 2015 at 02:47:00PM -0400, Xu Wang wrote:
 
  Is it possible to search based on which message ID a message
  *responds* to? For example, suppose message id is MESSAGEID. I want to
  find all emails that responded to MESSAGEID. How to enter such a query
  into notmuch?

 AFAIK, this is not possible.  Notmuch does not allow searching special
 headers.  You could probably write a script using the threads output
 format to get the thread, and then use formail to find the responses.

 Try the attached script.  It accepts notmuch queries by message id.
 E.g. to get the responses to your OP, you can do:

   $ ./nm-ack 
 id:CAJhTkNhYew6H-bptACTew3gN3DLWg6agTYu8hAkdwFS=z4v...@mail.gmail.com
   id:877fr79upd@maritornes.cs.unb.ca 
 id:20150613205552.gc17...@chitra.no-ip.org

 The first one is David's response, the second one is mine.

 Hope this helps,

 --
 Suvayu

These are exactly what I was looking for! I tried Suvayu's script with
success, and although I did not try the script referenced by David's
email, the goal is exactly my goal and thus it seems it should do as I
would like as well.

Thank you so very much to you for persisting in helping me, even
despite the lack of clarity in my messages. I highly appreciate you
and your time.

Happy regards,

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


search query "replytoid:"

2015-06-13 Thread Xu Wang
Dear all,

Is it possible to search based on which message ID a message
*responds* to? For example, suppose message id is MESSAGEID. I want to
find all emails that responded to MESSAGEID. How to enter such a query
into notmuch?

Kind regards,

Xu


Understanding the "replied" tag

2015-06-13 Thread Xu Wang
On Thu, Jun 11, 2015 at 2:39 PM, Xu Wang  wrote:
> On Thu, Jun 11, 2015 at 2:25 PM, Jani Nikula  wrote:
>> On Thu, 11 Jun 2015, Xu Wang  wrote:
>>> Dear all,
>>>
>>> First, I am extremely excited to be a part of this list now. notmuch
>>> has really helped me. Thank you go all individuals working to improve
>>> it and to help others to know how to use it.
>>>
>>> I would really like to know if a message has been replied to (e.g.
>>> using a certain message id). It seems that all I need to do is check
>>> for the "replied" tag. But often this tag is not there, even when
>>> there has been a reply (I have confirmed this through the thread
>>> display and checking the message that replied to the message to make
>>> sure it indeed has header "replied-to:").
>>>
>>> I have looked in mutt, and also I see many situations where there is
>>> no 'r' flag, especially for emails sent from me.
>>>
>>> The following returns true:
>>> notmuch config get maildir.synchronize_flags
>>>
>>> So at least both are giving same answer, but I'm not sure why not
>>> saying "replied" thread is correct.
>>>
>>> What is incorrect for my way of thinking about "replied"? Do I
>>> misunderstand what it is supposed to do or am I not updating the flags
>>> correctly?
>>
>> Notmuch deals with the "replied" tag in two ways.
>>
>> First, the tag is synchronized with the maildir flag R, both ways. This
>> is the "R" in the filename after ":2,". See [1] for details.
>>
>> Second, the notmuch-emacs interface adds the "replied" tag upon sending
>> the reply. You can customize this tag, but note that only "replied" gets
>> synchronized to maildir flags.
>>
>> If you use a MUA that doesn't either add the R flag or call notmuch to
>> add the "replied" tag, you'll lose this bit of information.
>>
>> You might also find [2] relevant.
>>
>> BR,
>> Jani.
>>
>>
>> [1] http://cr.yp.to/proto/maildir.html
>> [2] http://notmuchmail.org/special-tags/
>
> Thank you so much, Jani. This is very informative to me. I think I
> have a good understanding now of what is going on.
>
> My question then is this:
>
> I trust notmuch more than mutt, because notmuch is aware of threads
> and all mail boxes. Also note that I often use gmail web interface to
> reply emails.
>
> Am I correct in the following: if notmuch wanted to, when I run
> "notmuch new", notmuch has the information that it could
> (theoretically) update and correct all of the "replied" tags. Is that
> correct? If so, my next question is: why doesn't it do that?
>
> I think I'm close to getting notmuch intution on its goals.
>
> Kind regards,

The following message is in response to Suvayu (I am now finally
subscribed to the list so I will have no future problem):

Thank you. The problem in the end is that I would like 'notmuch new'
to not only schronize the 'reply' tag but to master handle the reply
tag because notmuch knows which messages have been replied to (because
it is aware of threads).

Kind regards,

Xu


Re: Understanding the replied tag

2015-06-13 Thread Xu Wang
Dear Suvayu and Austin,

Thank you for your attempts to understand my goals. I apologize for
the lack in the clarity of my previous messages. Thank you kindly for
your persistence and thank you to Suvayu for suggestions on adding
more information.

I am indeed using mutt-kz, along with offlineimap, on Ubuntu 15.04. I
have written the following information the other email thread I
started (perhaps I should have added it as a reply here, but I thought
it might be sufficiently a different topic). I will copy the
information I gave there on my goal here:

My goal is to do something like the following:
notmuch search tag:reply-required and not tag:replied

which was discussed here:
http://notmuchmail.org/pipermail/notmuch/2010/002558.html

However, instead of conditioning on tag:reply-required, I would like
to look at this for a specific message. For example, if I write an
important message, I can do the following:
save the message id, and then in 5 days set a cron script to check
whether my message was responded to. If it was not responded to I will
take some action to notify myself (haven't decided what yet).
It is the If it was not responded to part that this email thread is
about. I am now realizing that I cannot use mutt's tag replied
because I often send and read email from gmail or other IMap clients
(e.g. phone). Because of this (I believe), the reply tag does not get
set when it should (well not should but rather when I want it to).
For example, I often have

abc
-def
  - ghi

where the message def does not have the replied tag, even though it
was replied to (ghi replied to it). I think the reason is what I
suggested above. Yes, indeed Austin was correct about where my
misunderstanding was. I do indeed want to see if *any* reply was to a
certain message id, but the replied tag is apparently for my own
replying.

Because I cannot use the replied tag (unless I have misunderstood),
I thought I could just check using the message id with 'notmuch search
repliedto:messageid', but Suvayu points out that searching for this
is not supported.

Kind regards,

Xu

On Sat, Jun 13, 2015 at 7:12 PM, Austin Clements
acleme...@csail.mit.edu wrote:
 Hi Xu. I may be misunderstanding your email, but it sounds like you want to 
 know if a message has *any* reply message. That's not what the replied tag 
 indicates. The replied tag indicates that *you* have sent a reply to a 
 message. Mechanically, when you hit, say, r to start a reply and then send 
 that message, notmuch tags the message you hit r on as replied. That's the 
 only time notmuch automatically sets this tag.

 On June 11, 2015 10:25:44 AM PDT, Xu Wang xuwang...@gmail.com wrote:
Dear all,

First, I am extremely excited to be a part of this list now. notmuch
has really helped me. Thank you go all individuals working to improve
it and to help others to know how to use it.

I would really like to know if a message has been replied to (e.g.
using a certain message id). It seems that all I need to do is check
for the replied tag. But often this tag is not there, even when
there has been a reply (I have confirmed this through the thread
display and checking the message that replied to the message to make
sure it indeed has header replied-to:MSG-ID).

I have looked in mutt, and also I see many situations where there is
no 'r' flag, especially for emails sent from me.

The following returns true:
notmuch config get maildir.synchronize_flags

So at least both are giving same answer, but I'm not sure why not
saying replied thread is correct.

What is incorrect for my way of thinking about replied? Do I
misunderstand what it is supposed to do or am I not updating the flags
correctly?

Kind regards,

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

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


Re: search query replytoid:blah

2015-06-13 Thread Xu Wang
On Sat, Jun 13, 2015 at 5:14 PM, David Bremner da...@tethera.net wrote:
 Xu Wang xuwang...@gmail.com writes:

 Dear all,

 Is it possible to search based on which message ID a message
 *responds* to? For example, suppose message id is MESSAGEID. I want to
 find all emails that responded to MESSAGEID. How to enter such a query
 into notmuch?

 Threads aren't exactly the concept you ask for, because the include the
 messages before the message-id in question as well. Nonetheless, maybe
 the following helps:


 % notmuch show $(notmuch search --output=threads $MESAGEID)

 or

 % notmuch search --output=messages $(notmuch search --output=threads 
 $MESAGEID)

Dear David and Suvayu,

Thank you for your ideas. My goal is to do something like the following:
notmuch search tag:reply-required and not tag:replied

which was discussed here:
http://notmuchmail.org/pipermail/notmuch/2010/002558.html

However, instead of conditioning on tag:reply-required, I would like
to look at this for a specific message. For example, if I write an
important message, I can do the following:
save the message id, and then in 5 days set a cron script to check
whether my message was responded to. If it was not responded to I will
take some action to notify myself (haven't decided what yet).
It is the If it was not responded to part that this email thread is
about. I am now realizing that I cannot use mutt's tag replied
because I often send and read email from gmail or other IMap clients
(e.g. phone). Because of this (I believe), the reply tag does not get
set when it should (well not should but rather when I want it to).
For example, I often have

abc
-def
  - ghi

where the message def does not have the replied tag, even though it
was replied to (ghi replied to it). I think the reason is what I
suggested above.

Because I cannot use the replied tag (unless I have misunderstood),
I thought I could just check using the message id with 'notmuch search
repliedto:messageid', but Suvayu points out that searching for this
is not supported.

Kind regards,

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


Re: Understanding the replied tag

2015-06-13 Thread Xu Wang
On Thu, Jun 11, 2015 at 2:25 PM, Jani Nikula j...@nikula.org wrote:
 On Thu, 11 Jun 2015, Xu Wang xuwang...@gmail.com wrote:
 Dear all,

 First, I am extremely excited to be a part of this list now. notmuch
 has really helped me. Thank you go all individuals working to improve
 it and to help others to know how to use it.

 I would really like to know if a message has been replied to (e.g.
 using a certain message id). It seems that all I need to do is check
 for the replied tag. But often this tag is not there, even when
 there has been a reply (I have confirmed this through the thread
 display and checking the message that replied to the message to make
 sure it indeed has header replied-to:MSG-ID).

 I have looked in mutt, and also I see many situations where there is
 no 'r' flag, especially for emails sent from me.

 The following returns true:
 notmuch config get maildir.synchronize_flags

 So at least both are giving same answer, but I'm not sure why not
 saying replied thread is correct.

 What is incorrect for my way of thinking about replied? Do I
 misunderstand what it is supposed to do or am I not updating the flags
 correctly?

 Notmuch deals with the replied tag in two ways.

 First, the tag is synchronized with the maildir flag R, both ways. This
 is the R in the filename after :2,. See [1] for details.

 Second, the notmuch-emacs interface adds the replied tag upon sending
 the reply. You can customize this tag, but note that only replied gets
 synchronized to maildir flags.

 If you use a MUA that doesn't either add the R flag or call notmuch to
 add the replied tag, you'll lose this bit of information.

 You might also find [2] relevant.

 BR,
 Jani.


 [1] http://cr.yp.to/proto/maildir.html
 [2] http://notmuchmail.org/special-tags/

Thank you so much, Jani. This is very informative to me. I think I
have a good understanding now of what is going on.

My question then is this:

I trust notmuch more than mutt, because notmuch is aware of threads
and all mail boxes. Also note that I often use gmail web interface to
reply emails.

Am I correct in the following: if notmuch wanted to, when I run
notmuch new, notmuch has the information that it could
(theoretically) update and correct all of the replied tags. Is that
correct? If so, my next question is: why doesn't it do that?

I think I'm close to getting notmuch intution on its goals.

Kind regards,

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


Re: Understanding the replied tag

2015-06-13 Thread Xu Wang
On Thu, Jun 11, 2015 at 2:39 PM, Xu Wang xuwang...@gmail.com wrote:
 On Thu, Jun 11, 2015 at 2:25 PM, Jani Nikula j...@nikula.org wrote:
 On Thu, 11 Jun 2015, Xu Wang xuwang...@gmail.com wrote:
 Dear all,

 First, I am extremely excited to be a part of this list now. notmuch
 has really helped me. Thank you go all individuals working to improve
 it and to help others to know how to use it.

 I would really like to know if a message has been replied to (e.g.
 using a certain message id). It seems that all I need to do is check
 for the replied tag. But often this tag is not there, even when
 there has been a reply (I have confirmed this through the thread
 display and checking the message that replied to the message to make
 sure it indeed has header replied-to:MSG-ID).

 I have looked in mutt, and also I see many situations where there is
 no 'r' flag, especially for emails sent from me.

 The following returns true:
 notmuch config get maildir.synchronize_flags

 So at least both are giving same answer, but I'm not sure why not
 saying replied thread is correct.

 What is incorrect for my way of thinking about replied? Do I
 misunderstand what it is supposed to do or am I not updating the flags
 correctly?

 Notmuch deals with the replied tag in two ways.

 First, the tag is synchronized with the maildir flag R, both ways. This
 is the R in the filename after :2,. See [1] for details.

 Second, the notmuch-emacs interface adds the replied tag upon sending
 the reply. You can customize this tag, but note that only replied gets
 synchronized to maildir flags.

 If you use a MUA that doesn't either add the R flag or call notmuch to
 add the replied tag, you'll lose this bit of information.

 You might also find [2] relevant.

 BR,
 Jani.


 [1] http://cr.yp.to/proto/maildir.html
 [2] http://notmuchmail.org/special-tags/

 Thank you so much, Jani. This is very informative to me. I think I
 have a good understanding now of what is going on.

 My question then is this:

 I trust notmuch more than mutt, because notmuch is aware of threads
 and all mail boxes. Also note that I often use gmail web interface to
 reply emails.

 Am I correct in the following: if notmuch wanted to, when I run
 notmuch new, notmuch has the information that it could
 (theoretically) update and correct all of the replied tags. Is that
 correct? If so, my next question is: why doesn't it do that?

 I think I'm close to getting notmuch intution on its goals.

 Kind regards,

The following message is in response to Suvayu (I am now finally
subscribed to the list so I will have no future problem):

Thank you. The problem in the end is that I would like 'notmuch new'
to not only schronize the 'reply' tag but to master handle the reply
tag because notmuch knows which messages have been replied to (because
it is aware of threads).

Kind regards,

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


search query replytoid:blah

2015-06-13 Thread Xu Wang
Dear all,

Is it possible to search based on which message ID a message
*responds* to? For example, suppose message id is MESSAGEID. I want to
find all emails that responded to MESSAGEID. How to enter such a query
into notmuch?

Kind regards,

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


Understanding the "replied" tag

2015-06-11 Thread Xu Wang
On Thu, Jun 11, 2015 at 2:25 PM, Jani Nikula  wrote:
> On Thu, 11 Jun 2015, Xu Wang  wrote:
>> Dear all,
>>
>> First, I am extremely excited to be a part of this list now. notmuch
>> has really helped me. Thank you go all individuals working to improve
>> it and to help others to know how to use it.
>>
>> I would really like to know if a message has been replied to (e.g.
>> using a certain message id). It seems that all I need to do is check
>> for the "replied" tag. But often this tag is not there, even when
>> there has been a reply (I have confirmed this through the thread
>> display and checking the message that replied to the message to make
>> sure it indeed has header "replied-to:").
>>
>> I have looked in mutt, and also I see many situations where there is
>> no 'r' flag, especially for emails sent from me.
>>
>> The following returns true:
>> notmuch config get maildir.synchronize_flags
>>
>> So at least both are giving same answer, but I'm not sure why not
>> saying "replied" thread is correct.
>>
>> What is incorrect for my way of thinking about "replied"? Do I
>> misunderstand what it is supposed to do or am I not updating the flags
>> correctly?
>
> Notmuch deals with the "replied" tag in two ways.
>
> First, the tag is synchronized with the maildir flag R, both ways. This
> is the "R" in the filename after ":2,". See [1] for details.
>
> Second, the notmuch-emacs interface adds the "replied" tag upon sending
> the reply. You can customize this tag, but note that only "replied" gets
> synchronized to maildir flags.
>
> If you use a MUA that doesn't either add the R flag or call notmuch to
> add the "replied" tag, you'll lose this bit of information.
>
> You might also find [2] relevant.
>
> BR,
> Jani.
>
>
> [1] http://cr.yp.to/proto/maildir.html
> [2] http://notmuchmail.org/special-tags/

Thank you so much, Jani. This is very informative to me. I think I
have a good understanding now of what is going on.

My question then is this:

I trust notmuch more than mutt, because notmuch is aware of threads
and all mail boxes. Also note that I often use gmail web interface to
reply emails.

Am I correct in the following: if notmuch wanted to, when I run
"notmuch new", notmuch has the information that it could
(theoretically) update and correct all of the "replied" tags. Is that
correct? If so, my next question is: why doesn't it do that?

I think I'm close to getting notmuch intution on its goals.

Kind regards,

Xu


Understanding the "replied" tag

2015-06-11 Thread Xu Wang
Dear all,

First, I am extremely excited to be a part of this list now. notmuch
has really helped me. Thank you go all individuals working to improve
it and to help others to know how to use it.

I would really like to know if a message has been replied to (e.g.
using a certain message id). It seems that all I need to do is check
for the "replied" tag. But often this tag is not there, even when
there has been a reply (I have confirmed this through the thread
display and checking the message that replied to the message to make
sure it indeed has header "replied-to:").

I have looked in mutt, and also I see many situations where there is
no 'r' flag, especially for emails sent from me.

The following returns true:
notmuch config get maildir.synchronize_flags

So at least both are giving same answer, but I'm not sure why not
saying "replied" thread is correct.

What is incorrect for my way of thinking about "replied"? Do I
misunderstand what it is supposed to do or am I not updating the flags
correctly?

Kind regards,

Xu


Understanding the replied tag

2015-06-11 Thread Xu Wang
Dear all,

First, I am extremely excited to be a part of this list now. notmuch
has really helped me. Thank you go all individuals working to improve
it and to help others to know how to use it.

I would really like to know if a message has been replied to (e.g.
using a certain message id). It seems that all I need to do is check
for the replied tag. But often this tag is not there, even when
there has been a reply (I have confirmed this through the thread
display and checking the message that replied to the message to make
sure it indeed has header replied-to:MSG-ID).

I have looked in mutt, and also I see many situations where there is
no 'r' flag, especially for emails sent from me.

The following returns true:
notmuch config get maildir.synchronize_flags

So at least both are giving same answer, but I'm not sure why not
saying replied thread is correct.

What is incorrect for my way of thinking about replied? Do I
misunderstand what it is supposed to do or am I not updating the flags
correctly?

Kind regards,

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