~protesilaos/dotfiles

16 3

notmuch: why do you keep every msg into inbox

Details
Message ID
<87o80qqy9p.fsf@nadanix.com>
DKIM signature
missing
Download raw message
Hi Prot,

just out of curiosity

I see you keep every message you sent with `inbox` tag.  What's the
logic behind that? Im refering to this line:

`notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
not to:"*@protesilaos.com*" not tag:list)'`

I like this when I recently sent a message to track it in inbox. But
it's weird for me not be able to archive/clean inbox later.

Regards

-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<87mtgaa06d.fsf@protesilaos.com>
In-Reply-To
<87o80qqy9p.fsf@nadanix.com> (view parent)
DKIM signature
pass
Download raw message
> From: Juanjo Presa <juanjo.presa@nadanix.com>
> Date: Sun, 24 Apr 2022 17:47:14 +0200
>
> Hi Prot,

Hello Juanjo,

> just out of curiosity
>
> I see you keep every message you sent with `inbox` tag.  What's the
> logic behind that? Im refering to this line:
>
> `notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
> not to:"*@protesilaos.com*" not tag:list)'`
>
> I like this when I recently sent a message to track it in inbox. But
> it's weird for me not be able to archive/clean inbox later.

The idea is to keep the whole thread in the inbox for easy retrieval.
When the thread is no longer relevant, I will either archive it or
outright delete it (depending on the case).

Do you have a better of handling this use-case?

-- 
Protesilaos Stavrou
https://protesilaos.com
Juanjo Presa <juanjop@gmail.com>
Details
Message ID
<877d7eie56.fsf@nadanix.com>
In-Reply-To
<87mtgaa06d.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Sun, 24 Apr 2022 19:58:02 +0300
>
>> From: Juanjo Presa <juanjo.presa@nadanix.com>
>> Date: Sun, 24 Apr 2022 17:47:14 +0200
>>
>> Hi Prot,
>
> Hello Juanjo,
>
>> just out of curiosity
>>
>> I see you keep every message you sent with `inbox` tag.  What's the
>> logic behind that? Im refering to this line:
>>
>> `notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
>> not to:"*@protesilaos.com*" not tag:list)'`
>>
>> I like this when I recently sent a message to track it in inbox. But
>> it's weird for me not be able to archive/clean inbox later.
>
> The idea is to keep the whole thread in the inbox for easy retrieval.
> When the thread is no longer relevant, I will either archive it or
> outright delete it (depending on the case).

That's ok. But with that post-new hook line, sent archived messages are coming
back to inbox everytime.  I guess I'm missing some config piece.

> Do you have a better of handling this use-case?

-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<87k0be9x6y.fsf@protesilaos.com>
In-Reply-To
<877d7eie56.fsf@nadanix.com> (view parent)
DKIM signature
pass
Download raw message
> From: Juanjo Presa <juanjop@gmail.com>
> Date: Sun, 24 Apr 2022 19:29:09 +0200

>>> I see you keep every message you sent with `inbox` tag.  What's the
>>> logic behind that? Im refering to this line:
>>>
>>> `notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
>>> not to:"*@protesilaos.com*" not tag:list)'`
>>>
>>> I like this when I recently sent a message to track it in inbox. But
>>> it's weird for me not be able to archive/clean inbox later.
>>
>> The idea is to keep the whole thread in the inbox for easy retrieval.
>> When the thread is no longer relevant, I will either archive it or
>> outright delete it (depending on the case).
>
> That's ok. But with that post-new hook line, sent archived messages are coming
> back to inbox everytime.  I guess I'm missing some config piece.

So you are archiving only the sent messages but are keeping the ones you
receive in the inbox?

If an archived thread gets a new message, then yes that will show up
again in the inbox.  I find that useful because I can review what was
discussed before.

That granted, I only ever archive a thread once it is done.  That way it
never comes back to the inbox because no new messages arrive for it.

-- 
Protesilaos Stavrou
https://protesilaos.com
Juanjo Presa <juanjop@gmail.com>
Details
Message ID
<87tuaiuyfh.fsf@nadanix.com>
In-Reply-To
<87k0be9x6y.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Sun, 24 Apr 2022 21:02:29 +0300
>

I'm very ok with your workflow.

>>>> I see you keep every message you sent with `inbox` tag.  What's the
>>>> logic behind that? Im refering to this line:
>>>>
>>>> `notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
>>>> not to:"*@protesilaos.com*" not tag:list)'`

I mean, I need to change above config line by:

`notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
not to:"*@protesilaos.com*" not tag:list not tag:archived)'`

to avoid tag +inbox every time `notmuch new` runs.

>>>>
>>>> I like this when I recently sent a message to track it in inbox. But
>>>> it's weird for me not be able to archive/clean inbox later.
>>>
>>> The idea is to keep the whole thread in the inbox for easy retrieval.
>>> When the thread is no longer relevant, I will either archive it or
>>> outright delete it (depending on the case).
>>
>> That's ok. But with that post-new hook line, sent archived messages are coming
>> back to inbox everytime.  I guess I'm missing some config piece.
>
> So you are archiving only the sent messages but are keeping the ones you
> receive in the inbox?
>
> If an archived thread gets a new message, then yes that will show up
> again in the inbox.  I find that useful because I can review what was
> discussed before.
>
> That granted, I only ever archive a thread once it is done.  That way it
> never comes back to the inbox because no new messages arrive for it.

-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<87sfq1yfra.fsf@protesilaos.com>
In-Reply-To
<87tuaiuyfh.fsf@nadanix.com> (view parent)
DKIM signature
pass
Download raw message
> From: Juanjo Presa <juanjop@gmail.com>
> Date: Sun, 24 Apr 2022 20:30:10 +0200
>
>>>>> I see you keep every message you sent with `inbox` tag.  What's the
>>>>> logic behind that? Im refering to this line:
>>>>>
>>>>> `notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
>>>>> not to:"*@protesilaos.com*" not tag:list)'`
>
> I mean, I need to change above config line by:
>
> `notmuch tag -new -unread +inbox +sent -- '(from:"*@protesilaos.com*"
> not to:"*@protesilaos.com*" not tag:list not tag:archived)'`
>
> to avoid tag +inbox every time `notmuch new` runs.

I am not sure how that will be treated.  Suppose this:

1. There is a thread that has been archived, meaning +archive -inbox for
   every message it contains.
2. A new message arrives in that thread.  It is +inbox +unread, but the
   rest of the thread is not in the inbox anymore.

Will that thread still show up in the inbox, or just the latest message?

If it still appears as unread in the inbox with the rest of the thread,
then your change is fine.  Otherwise we might never see the new message
or lose some important context.

* * *

Obviously, you will need to change the above lines to reference your
email addresses.  You don't want messages from @protesilaos.com to be
tagged as "sent" on your end---that is just for me.

-- 
Protesilaos Stavrou
https://protesilaos.com
Juanjo Presa <juanjop@gmail.com>
Details
Message ID
<878rrtljup.fsf@nadanix.com>
In-Reply-To
<87sfq1yfra.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Mon, 25 Apr 2022 06:59:53 +0300
>
> I am not sure how that will be treated.  Suppose this:
>
> 1. There is a thread that has been archived, meaning +archive -inbox for
>    every message it contains.
> 2. A new message arrives in that thread.  It is +inbox +unread, but the
>    rest of the thread is not in the inbox anymore.

This is working well for me.

> Will that thread still show up in the inbox, or just the latest message?

My problem is that every archived sent message is showing up again in
the inbox (with or without new messages in that thread). And I think the
root cause is that line of notmuch config.

> If it still appears as unread in the inbox with the rest of the thread,
> then your change is fine.  Otherwise we might never see the new message
> or lose some important context.

Suppose this:

1. I send a new mail.
2. When post-new hook runs it show up in the inbox with tags:(inbox sent).
3. I archive it with +archived -inbox.
4. When post-new hook runs again it show up in the inbox with
tags:(archived inbox sent).

> * * *
>
> Obviously, you will need to change the above lines to reference your
> email addresses.  You don't want messages from @protesilaos.com to be
> tagged as "sent" on your end---that is just for me.

Absolutely, I patch your personal data before deploy configs or
overwrite it using user-emacs.org

-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<87a6c87bs9.fsf@protesilaos.com>
In-Reply-To
<878rrtljup.fsf@nadanix.com> (view parent)
DKIM signature
pass
Download raw message
> From: Juanjo Presa <juanjop@gmail.com>
> Date: Mon, 25 Apr 2022 09:09:50 +0200
>
>> From: Protesilaos Stavrou <info@protesilaos.com>
>> Date: Mon, 25 Apr 2022 06:59:53 +0300
>>
>> I am not sure how that will be treated.  Suppose this:
>>
>> 1. There is a thread that has been archived, meaning +archive -inbox for
>>    every message it contains.
>> 2. A new message arrives in that thread.  It is +inbox +unread, but the
>>    rest of the thread is not in the inbox anymore.
>
> This is working well for me.

Okay.

>> Will that thread still show up in the inbox, or just the latest message?
>
> My problem is that every archived sent message is showing up again in
> the inbox (with or without new messages in that thread). And I think the
> root cause is that line of notmuch config.

You mean it shows up as part of the entire thread?  Thinking about it
again, this may be how notmuch does it to keep the context.

Does your suggested change fix this issue?

>> If it still appears as unread in the inbox with the rest of the thread,
>> then your change is fine.  Otherwise we might never see the new message
>> or lose some important context.
>
> Suppose this:
>
> 1. I send a new mail.
> 2. When post-new hook runs it show up in the inbox with tags:(inbox sent).
> 3. I archive it with +archived -inbox.
> 4. When post-new hook runs again it show up in the inbox with
> tags:(archived inbox sent).

Thanks for clarifying!

My question is why archive a sent message if you still keep the other
part of the thread in the inbox?

This is how I conceptualise it.  Before switching to notmuch, I used to
think of the +inbox as the physical inbox mail directory.  In that
sense, sent messages do not belong there.  But I quickly realised that
the +inbox is a tag we can use to keep relevant messages together.
This, in turn, made me change my mindset on how to treat emails: instead
of thinking of them as singular items which belong to different
directories, I have them as virtual groupings into threads by virtue of
a common tag.  So if, for example, I want to review this exchange we've
had here, I can find your messages and mine all in one place: no need to
search elsewhere.

Otherwise, your suggested change seems like the right approach (though I
have not tested it).

>> * * *
>>
>> Obviously, you will need to change the above lines to reference your
>> email addresses.  You don't want messages from @protesilaos.com to be
>> tagged as "sent" on your end---that is just for me.
>
> Absolutely, I patch your personal data before deploy configs or
> overwrite it using user-emacs.org

Hopefully this is not be too much work for you.  If you think we can
introduce some variables/abstractions to make this easier, I am happy to
do it.

-- 
Protesilaos Stavrou
https://protesilaos.com
Juanjo Presa <juanjop@gmail.com>
Details
Message ID
<87sfq0b39p.fsf@nadanix.com>
In-Reply-To
<87a6c87bs9.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Tue, 26 Apr 2022 06:40:06 +0300
>
> Thanks for clarifying!
>
> My question is why archive a sent message if you still keep the other
> part of the thread in the inbox?
>
> This is how I conceptualise it.  Before switching to notmuch, I used to
> think of the +inbox as the physical inbox mail directory.  In that
> sense, sent messages do not belong there.  But I quickly realised that
> the +inbox is a tag we can use to keep relevant messages together.
> This, in turn, made me change my mindset on how to treat emails: instead
> of thinking of them as singular items which belong to different
> directories, I have them as virtual groupings into threads by virtue of
> a common tag.  So if, for example, I want to review this exchange we've
> had here, I can find your messages and mine all in one place: no need to
> search elsewhere.

Sorry Prot, I feel a bit frustrated because I'm making lost your time
and I feel I'm not communicating well what my problem/bug is, my fault
and my bad english. I'll try to rephrase it again, suppose this:

1. I start a new thread sending an email (email#1)
2. post-new hooks runs and email#1 appears in my inbox.
3. I complete the thread offline, so NO NEW MAILS in that thread.
4. I archive/complete the only email in thread, email#1.

Then, this happen:

5. post-new hook runs again, archived email#1, show up again in the
inbox.

What I expect:

5. email#1 never show up in the inbox again.

Hope I transmit well now.

> ****
>
> Hopefully this is not be too much work for you.  If you think we can
> introduce some variables/abstractions to make this easier, I am happy to
> do it.

Sure, I can share with you later what variables I'm patching.

-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<m15ymw6t23.fsf@christiantietze.de>
In-Reply-To
<87mtgaa06d.fsf@protesilaos.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
How are you two displaying the tag:inbox? In tree-view or the flat
search view?

In the past, I found that replies to old threads would pop up in my
inbox, and when I read these replies, the context is restored
automatically, i.e. the reply is displayed with old messages around it;
hitting 'Z' for `notmuch-tree-from-show-current-query' then successfully
restores the whole threaded view.

@Prot: It sounds like you're only getting the isolated reply, though?

If so, putting back old messages from a list into the inbox again sounds
like a hack to get back the original behavior.

-- Christian
Details
Message ID
<87sfpzvs2g.fsf@protesilaos.com>
In-Reply-To
<87sfq0b39p.fsf@nadanix.com> (view parent)
DKIM signature
pass
Download raw message
> From: Juanjo Presa <juanjop@gmail.com>
> Date: Tue, 26 Apr 2022 11:30:26 +0200
>
>> From: Protesilaos Stavrou <info@protesilaos.com>
>> Date: Tue, 26 Apr 2022 06:40:06 +0300
>>
>> Thanks for clarifying!
>>
>> My question is why archive a sent message if you still keep the other
>> part of the thread in the inbox?
>>
>> This is how I conceptualise it.  Before switching to notmuch, I used to
>> think of the +inbox as the physical inbox mail directory.  In that
>> sense, sent messages do not belong there.  But I quickly realised that
>> the +inbox is a tag we can use to keep relevant messages together.
>> This, in turn, made me change my mindset on how to treat emails: instead
>> of thinking of them as singular items which belong to different
>> directories, I have them as virtual groupings into threads by virtue of
>> a common tag.  So if, for example, I want to review this exchange we've
>> had here, I can find your messages and mine all in one place: no need to
>> search elsewhere.
>
> Sorry Prot, I feel a bit frustrated because I'm making lost your time
> and I feel I'm not communicating well what my problem/bug is, my fault
> and my bad english. I'll try to rephrase it again, suppose this:

No need to be sorry and don't worry about it.  If I can help you, I
will.

I think your english is fine and I understand what you are writing.  My
question earlier was about the workflow.

> 1. I start a new thread sending an email (email#1)
> 2. post-new hooks runs and email#1 appears in my inbox.
> 3. I complete the thread offline, so NO NEW MAILS in that thread.
> 4. I archive/complete the only email in thread, email#1.
>
> Then, this happen:
>
> 5. post-new hook runs again, archived email#1, show up again in the
> inbox.
>
> What I expect:
>
> 5. email#1 never show up in the inbox again.
>
> Hope I transmit well now.

Yes, all clear.  Did you try the change you suggested before?  It seemed
reasonable to me.

>> ****
>>
>> Hopefully this is not be too much work for you.  If you think we can
>> introduce some variables/abstractions to make this easier, I am happy to
>> do it.
>
> Sure, I can share with you later what variables I'm patching.

Thank you!

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87pml3vrot.fsf@protesilaos.com>
In-Reply-To
<m15ymw6t23.fsf@christiantietze.de> (view parent)
DKIM signature
pass
Download raw message
> From: Christian Tietze <me@christiantietze.de>
> Date: Tue, 26 Apr 2022 12:24:36 +0200
>
> How are you two displaying the tag:inbox? In tree-view or the flat
> search view?

I normally use the flat search view.

> In the past, I found that replies to old threads would pop up in my
> inbox, and when I read these replies, the context is restored
> automatically, i.e. the reply is displayed with old messages around it;
> hitting 'Z' for `notmuch-tree-from-show-current-query' then successfully
> restores the whole threaded view.

Notmuch has this notion of grouping together messages that have the same
thread ID but may belong to different tags.  You will notice when that
happens in the tree-view because the "foreign" messages (those that do
not have the current tag) are styled with gray text.  Granted, the
distinction is subtle, but it is there.

> @Prot: It sounds like you're only getting the isolated reply, though?
>
> If so, putting back old messages from a list into the inbox again sounds
> like a hack to get back the original behavior.

I am not sure what you mean.  In the search view (not the tree), each
line holds a thread.  When I enter a thread I get all the emails it
contains from the oldest to the newest.  Each email is its own "heading"
and you can quickly move between them with 'n' and 'p' (and fold it with
RET over the heading's line).

The tree view shows only one message at a time.  Maybe that is what you
have in mind?

-- 
Protesilaos Stavrou
https://protesilaos.com
Juanjo Presa <juanjop@gmail.com>
Details
Message ID
<87czh3bvyd.fsf@nadanix.com>
In-Reply-To
<87sfpzvs2g.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Tue, 26 Apr 2022 17:26:47 +0300
>
> Yes, all clear.  Did you try the change you suggested before?  It seemed
> reasonable to me.

Yes the change I suggest before works well for me.

>
>
> Thank you!

-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<87pml3i2kv.fsf@protesilaos.com>
In-Reply-To
<87czh3bvyd.fsf@nadanix.com> (view parent)
DKIM signature
pass
Download raw message
> From: Juanjo Presa <juanjop@gmail.com>
> Date: Tue, 26 Apr 2022 19:23:06 +0200
>
>> From: Protesilaos Stavrou <info@protesilaos.com>
>> Date: Tue, 26 Apr 2022 17:26:47 +0300
>>
>> Yes, all clear.  Did you try the change you suggested before?  It seemed
>> reasonable to me.
>
> Yes the change I suggest before works well for me.

Very well!  I just added it in my post-new as well but have not pushed
the change.  I need to see it in action for a little while to make sure
I don't miss anything.

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<m1h76f596p.fsf@christiantietze.de>
In-Reply-To
<87pml3vrot.fsf@protesilaos.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
>> @Prot: It sounds like you're only getting the isolated reply, though?
>>
>> If so, putting back old messages from a list into the inbox again sounds
>> like a hack to get back the original behavior.
>
> I am not sure what you mean.  In the search view (not the tree), each
> line holds a thread.  When I enter a thread I get all the emails it
> contains from the oldest to the newest.  Each email is its own "heading"
> and you can quickly move between them with 'n' and 'p' (and fold it with
> RET over the heading's line).
>
> The tree view shows only one message at a time.  Maybe that is what you
> have in mind?

Sorry, maybe I just didn't understand what you two were discussing :)

What you describe sounds like the "vanilla" notmuch experience -- so
when a reply (like this one?) arrives in your inbox, you can access the
whole thread because notmuch shows related messages above/below in the
message view (notmuch-show).

Then I, too, don't understand what you get in addition to this by
tagging all the other messages as +inbox, to be honest. Or rather: what did you miss before you added this?

-- Christian
Details
Message ID
<874k2fqaw0.fsf@protesilaos.com>
In-Reply-To
<m1h76f596p.fsf@christiantietze.de> (view parent)
DKIM signature
pass
Download raw message
> From: Christian Tietze <me@christiantietze.de>
> Date: Wed, 27 Apr 2022 08:31:26 +0200
>
>>> @Prot: It sounds like you're only getting the isolated reply, though?
>>>
>>> If so, putting back old messages from a list into the inbox again sounds
>>> like a hack to get back the original behavior.
>>
>> I am not sure what you mean.  In the search view (not the tree), each
>> line holds a thread.  When I enter a thread I get all the emails it
>> contains from the oldest to the newest.  Each email is its own "heading"
>> and you can quickly move between them with 'n' and 'p' (and fold it with
>> RET over the heading's line).
>>
>> The tree view shows only one message at a time.  Maybe that is what you
>> have in mind?
>
> Sorry, maybe I just didn't understand what you two were discussing :)

No worries!

> What you describe sounds like the "vanilla" notmuch experience -- so
> when a reply (like this one?) arrives in your inbox, you can access the
> whole thread because notmuch shows related messages above/below in the
> message view (notmuch-show).

Correct.

> Then I, too, don't understand what you get in addition to this by
> tagging all the other messages as +inbox, to be honest. Or rather:
> what did you miss before you added this?

By default notmuch tags every new message with +inbox +unread.  This is
done in the .notmuch-config file which has a `[new]` configuration
block.  Also by default, the notmuch setup does not rely on the post-new
script.

All I am doing is to (i) tag everything as +new in the .notmuch-config
and then (ii) apply specific tags in the post-new script.  This allows
me to keep in the inbox only what is addressed specifically to me by
filtering out mailing lists.

This is documented here: <https://notmuchmail.org/initial_tagging/>.

Does it make sense?

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87r15gfu5h.fsf@protesilaos.com>
In-Reply-To
<87pml3i2kv.fsf@protesilaos.com> (view parent)
DKIM signature
pass
Download raw message
> From: Protesilaos Stavrou <info@protesilaos.com>
> Date: Wed, 27 Apr 2022 07:15:44 +0300
>
>> From: Juanjo Presa <juanjop@gmail.com>
>> Date: Tue, 26 Apr 2022 19:23:06 +0200
>>
>>> From: Protesilaos Stavrou <info@protesilaos.com>
>>> Date: Tue, 26 Apr 2022 17:26:47 +0300
>>>
>>> Yes, all clear.  Did you try the change you suggested before?  It seemed
>>> reasonable to me.
>>
>> Yes the change I suggest before works well for me.
>
> Very well!  I just added it in my post-new as well but have not pushed
> the change.  I need to see it in action for a little while to make sure
> I don't miss anything.

Hello again!

I just pushed the update which filters out the +archived items, per your
suggestion.  I used it for a few days and did not notice any problems.

Thanks again for your feedback!

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)