Thanks Nicolas,

I understand better what is going on. BTW I think this still open
issue is about the same issue:
https://github.com/OfflineIMAP/offlineimap/issues/75

So offlineimap is not the problem but the user which quit
bruttaly mutt without using "q".

Another cause could be the use of several instance of mutt in the same
time. I very often write an email while reading a related other email.
Like mutt displays a empty screen while I write in emacs, I need
another mutt.

Here is the solution I set up for sync-to-disk *before* and after
archive and delete:

macro index,pager a <save-message>":set confirmappend=no 
delete=yes\n<save-message>=Petur/Archives\n<sync-mailbox>:set confirmappend=yes 
delete=yes\n"

bind index,pager d noop
macro index,pager d <sync-mailbox>":set confirmappend=no
delete=yes\n<save-message>+Petur/Trash<enter><sync-mailbox>:set
confirmappend=no delete=yes\n" "copy message to the trash"

Cheers,
Petur


On 22/01/18 00:55, Nicolas Sebrecht wrote:
On Sun, Jan 21, 2018 at 11:27:16PM +0100, Pétùr wrote:

Description of the problem:

1. I open in mutt a new (unread) email.

Marked read in memory.

2. While this email is open, I delete it (with "d").

Marked deleted in memory.

3. When I reopen mutt (or press "$") I have one new unread email in trash.

For the "reopen" case it depends how mutt was closed (gently or
bruttaly).

"$" is not to refresh but to sync on disk. It's the opposite. In this
case, the email marked deleted is removed from the local maildir on
disk.

P-S : I suppose it is not a specific offlineimap problem but I guess
here is a good place to find a solution. I didn't have this problem
before using offlineimap (I suppose remote IMAP server handle
differently the mark as read action).

Perhaps, mutt does not sync in memory operations the same way when in
IMAP mode.

Here, mutt sync changes on disk when pressing "$" or when opening
another folder.

--
Nicolas Sebrecht

_______________________________________________
OfflineIMAP-project mailing list: [email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project

OfflineIMAP homepages:
- https://github.com/OfflineIMAP
- http://offlineimap.org

Reply via email to