mu icon indicating copy to clipboard operation
mu copied to clipboard

[mu4e bug] Wrong timestamp for drafts with discarded edits

Open 88-percent opened this issue 5 months ago • 8 comments

Describe the bug

Date field for draft messages doesn't reliably update for a very specific use case: where a draft message has discarded edits.

This causes these messages to display an incorrect date upon send - including to recipient.

How to Reproduce

  1. create a new message (M-x mu4e-compose-new)
  2. draft new message
  3. save message as draft (M-x message-dont-send)

-- practically some time would elapse here --

  1. locate draft message
  2. edit message (M-x mu4e-compose-edit)
  3. choose account
  4. make edits
  5. discard edit (M-x message-kill-buffer)
  6. message modified; kill anyway? (y or n) - y
  7. remove the backup file too? (y or n) - y

-- practically some time would elapse here --

  1. locate draft message again
  2. edit message (M-x mu4e-compose-edit)
  3. choose account

Expected behavior: the message is opened in compose mode with all info the same as when it was saved except the date field which should be populated with the current time & date.

Actual behavior: the message is opened in compose mode with all info the same as when it was last saved - including the date field which is the time and date the message was last saved.

Environment

Emacs: 29.4 Spacemacs: 0.999 mu: 1.12.5 OS: Pop!OS 22.04

Checklist

  • [x] you are running either an 1.10.x/1.12.x release or master (otherwise please upgrade)
  • [ ] you can reproduce the problem without 3rd party extensions (including Doom/Evil, various extensions etc.)
  • [x] you have read all of the above

I'm running Spacemacs so I'm unfortunately unable to disable Evil for testing. I've tried to run the above without using evil commands.

88-percent avatar Sep 23 '24 18:09 88-percent