~rjarry/aerc#48: 
Support not marking messages as read when viewed

I use the "seen" flag to mark messages as "dealt with", and don't want messages to be automatically marked as seen.

I brought this up on IRC last month and ~rjarry suggested adding a -u flag to :view which prevents it from marking the message as read.

Status
REPORTED
Submitter
~falsifian
Assigned to
No-one
Submitted
3 months ago
Updated
2 months ago
Labels
feature

~falsifian 2 months ago

https://lists.sr.ht/~rjarry/aerc-devel/patches/33568 addresses this.

I decided to make it a configuration option instead of the suggested -u flag because the :view command isn't the only thing that can cause a message to get viewed. I changed NewMessageStoreView so that a new configuration option controls whether it marks the message as seen.

~rjarry 2 months ago

Maybe the correct solution is to always fetch the messages with .PEEK and only send the flag updates with a configurable grace period after the message was opened (by default, 250ms, but can be set to 0s to disable setting the \Seen flag).

What do you think?

James Cook 2 months ago · edit

On Thu Jul 21, 2022 at 10:07 PM UTC, ~rjarry wrote:

Maybe the correct solution is to always fetch the messages with .PEEK and only send the flag updates with a configurable grace period after the message was opened (by default, 250ms, but can be set to 0s to disable setting the \Seen flag).

What do you think?

So, if the message is closed before 250ms, it doesn't get marked as read?

Unfortunately I'm still busy with other stuff for about another week. Thoughts:

  • I don't know how hard it would be to implement, e.g. whether it's easy to tell 250ms later whether the message got closed or not.

  • Would it be clear to the user whether or not the event got triggered? E.g. imagine this sequence of events:

    • I view a message.
    • 250ms later, aerc starts asking the IMAP server to mark it Seen. But my network connection is flaky so it takes a while.
    • Shortly after that, I close the message.
    • I see the message is still Unseen in the message list, and stop paying attention and do something else.
    • Later, unnoticed by me, the IMAP interaction completes and it's marked Seen.
  • Timeouts in user interfaces tend to stress me out a little, but maybe that's just me, and anyway this one isn't too bad.

  • Of course none of this matters for me because I'll just set it to 0.

-- James

~rockorager 2 months ago*

Robin - did you see my response to the patch on the mailing list? We can turn on peek at the worker level with a config option very easily. I think that's the right way to do it.

EDIT: link

Register here or Log in to comment, or comment via email.